зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562688 part 15. Remove the eELEMENT bit. r=jst
This commit is contained in:
Родитель
0ff844ef61
Коммит
b398d9af92
|
@ -307,27 +307,25 @@ public:
|
|||
eDOCUMENT = 1 << 1,
|
||||
/** nsIAttribute nodes */
|
||||
eATTRIBUTE = 1 << 2,
|
||||
/** elements */
|
||||
eELEMENT = 1 << 3,
|
||||
/** text nodes */
|
||||
eTEXT = 1 << 4,
|
||||
eTEXT = 1 << 3,
|
||||
/** xml processing instructions */
|
||||
ePROCESSING_INSTRUCTION = 1 << 5,
|
||||
ePROCESSING_INSTRUCTION = 1 << 4,
|
||||
/** comment nodes */
|
||||
eCOMMENT = 1 << 6,
|
||||
eCOMMENT = 1 << 5,
|
||||
/** form control elements */
|
||||
eHTML_FORM_CONTROL = 1 << 7,
|
||||
eHTML_FORM_CONTROL = 1 << 6,
|
||||
/** svg elements */
|
||||
eSVG = 1 << 8,
|
||||
eSVG = 1 << 7,
|
||||
/** document fragments */
|
||||
eDOCUMENT_FRAGMENT = 1 << 9,
|
||||
eDOCUMENT_FRAGMENT = 1 << 8,
|
||||
/** data nodes (comments, PIs, text). Nodes of this type always
|
||||
returns a non-null value for nsIContent::GetText() */
|
||||
eDATA_NODE = 1 << 10,
|
||||
eDATA_NODE = 1 << 19,
|
||||
/** nsHTMLMediaElement */
|
||||
eMEDIA = 1 << 11,
|
||||
eMEDIA = 1 << 10,
|
||||
/** animation elements */
|
||||
eANIMATION = 1 << 12
|
||||
eANIMATION = 1 << 11
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -3242,7 +3242,7 @@ nsGenericElement::GetBindingParent() const
|
|||
PRBool
|
||||
nsGenericElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT));
|
||||
return !(aFlags & ~eCONTENT);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -5196,7 +5196,7 @@ TryMatchingElementsInSubtree(nsINode* aRoot,
|
|||
continue;
|
||||
}
|
||||
/* See whether we match */
|
||||
new (data) RuleProcessorData(aPresContext, kid, nsnull);
|
||||
new (data) RuleProcessorData(aPresContext, kid->AsElement(), nsnull);
|
||||
NS_ASSERTION(!data->mParentData, "Shouldn't happen");
|
||||
NS_ASSERTION(!data->mPreviousSiblingData, "Shouldn't happen");
|
||||
data->mParentData = aParentData;
|
||||
|
@ -5333,17 +5333,18 @@ nsNSElementTearoff::MozMatchesSelector(const nsAString& aSelector, PRBool* aRetu
|
|||
|
||||
/* static */
|
||||
PRBool
|
||||
nsGenericElement::doMatchesSelector(nsIContent* aNode, const nsAString& aSelector)
|
||||
nsGenericElement::doMatchesSelector(Element* aElement,
|
||||
const nsAString& aSelector)
|
||||
{
|
||||
nsAutoPtr<nsCSSSelectorList> selectorList;
|
||||
nsPresContext* presContext;
|
||||
PRBool matches = PR_FALSE;
|
||||
|
||||
if (NS_SUCCEEDED(ParseSelectorList(aNode, aSelector,
|
||||
if (NS_SUCCEEDED(ParseSelectorList(aElement, aSelector,
|
||||
getter_Transfers(selectorList),
|
||||
&presContext)))
|
||||
{
|
||||
RuleProcessorData data(presContext, aNode, nsnull);
|
||||
RuleProcessorData data(presContext, aElement, nsnull);
|
||||
matches = nsCSSRuleProcessor::SelectorListMatches(data, selectorList);
|
||||
}
|
||||
|
||||
|
|
|
@ -653,7 +653,8 @@ public:
|
|||
static nsresult doQuerySelectorAll(nsINode* aRoot,
|
||||
const nsAString& aSelector,
|
||||
nsIDOMNodeList **aReturn);
|
||||
static PRBool doMatchesSelector(nsIContent* aNode, const nsAString& aSelector);
|
||||
static PRBool doMatchesSelector(mozilla::dom::Element* aElement,
|
||||
const nsAString& aSelector);
|
||||
|
||||
/**
|
||||
* Default event prehandling for content objects. Handles event retargeting.
|
||||
|
|
|
@ -1145,12 +1145,6 @@ nsGenericHTMLElement::GetBaseTarget(nsAString& aBaseTarget) const
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -2240,7 +2234,7 @@ NS_IMPL_QUERY_INTERFACE_INHERITED1(nsGenericHTMLFormElement,
|
|||
PRBool
|
||||
nsGenericHTMLFormElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eHTML_FORM_CONTROL));
|
||||
return !(aFlags & ~(eCONTENT | eHTML_FORM_CONTROL));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -175,7 +175,6 @@ public:
|
|||
PRBool aNotify);
|
||||
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
PRBool aNotify);
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull, PRBool aWithMouse = PR_FALSE)
|
||||
{
|
||||
PRBool isFocusable = PR_FALSE;
|
||||
|
|
|
@ -2049,7 +2049,7 @@ nsresult nsHTMLMediaElement::Observe(nsISupports* aSubject,
|
|||
PRBool
|
||||
nsHTMLMediaElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eMEDIA));
|
||||
return !(aFlags & ~(eCONTENT | eMEDIA));
|
||||
}
|
||||
|
||||
void nsHTMLMediaElement::NotifyAddedSource()
|
||||
|
|
|
@ -407,7 +407,7 @@ nsMathMLElement::IntrinsicState() const
|
|||
PRBool
|
||||
nsMathMLElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT));
|
||||
return !(aFlags & ~eCONTENT);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -408,7 +408,7 @@ nsSVGAnimationElement::UnsetAttr(PRInt32 aNamespaceID,
|
|||
PRBool
|
||||
nsSVGAnimationElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eSVG | eANIMATION));
|
||||
return !(aFlags & ~(eCONTENT | eSVG | eANIMATION));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -708,7 +708,7 @@ nsSVGElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
|||
PRBool
|
||||
nsSVGElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eSVG));
|
||||
return !(aFlags & ~(eCONTENT | eSVG));
|
||||
}
|
||||
|
||||
already_AddRefed<nsIURI>
|
||||
|
|
|
@ -1277,11 +1277,11 @@ nsBindingManager::WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc,
|
|||
{
|
||||
*aCutOffInheritance = PR_FALSE;
|
||||
|
||||
NS_ASSERTION(aData->mContent, "How did that happen?");
|
||||
NS_ASSERTION(aData->mElement, "How did that happen?");
|
||||
|
||||
// Walk the binding scope chain, starting with the binding attached to our
|
||||
// content, up till we run out of scopes or we get cut off.
|
||||
nsIContent *content = aData->mContent;
|
||||
nsIContent *content = aData->mElement;
|
||||
|
||||
do {
|
||||
nsXBLBinding *binding = GetBinding(content);
|
||||
|
@ -1290,7 +1290,7 @@ nsBindingManager::WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc,
|
|||
binding->WalkRules(aFunc, aData);
|
||||
// If we're not looking at our original content, allow the binding to cut
|
||||
// off style inheritance
|
||||
if (content != aData->mContent) {
|
||||
if (content != aData->mElement) {
|
||||
if (!binding->InheritsStyle()) {
|
||||
// Go no further; we're not inheriting style from anything above here
|
||||
break;
|
||||
|
|
|
@ -2135,7 +2135,7 @@ nsXULElement::GetBindingParent() const
|
|||
PRBool
|
||||
nsXULElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT));
|
||||
return !(aFlags & ~eCONTENT);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Загрузка…
Ссылка в новой задаче