зеркало из https://github.com/mozilla/pjs.git
Change some users of GetAttr to HasAttr instead. Bug 113564, r=jag, sr=jst.
This commit is contained in:
Родитель
fc030b3f78
Коммит
4668370855
|
@ -872,11 +872,10 @@ HTMLStyleSheetImpl::HasStateDependentStyle(StateRuleProcessorData* aData,
|
|||
aData->mStyledContent &&
|
||||
aData->mIsHTMLContent &&
|
||||
aData->mContentTag == nsHTMLAtoms::a) {
|
||||
nsAutoString href;
|
||||
nsresult attrState =
|
||||
aData->mStyledContent->GetAttr(kNameSpaceID_None,
|
||||
nsHTMLAtoms::href, href);
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == attrState)
|
||||
PRBool hasHrefAttr =
|
||||
aData->mStyledContent->HasAttr(kNameSpaceID_None,
|
||||
nsHTMLAtoms::href);
|
||||
if (hasHrefAttr)
|
||||
result = NS_OK; // yes, style will depend on link state
|
||||
}
|
||||
|
||||
|
|
|
@ -5077,11 +5077,9 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
|
|||
else if (aTag == nsXULAtoms::text || aTag == nsHTMLAtoms::label ||
|
||||
aTag == nsXULAtoms::description) {
|
||||
isReplaced = PR_TRUE;
|
||||
if (aTag == nsHTMLAtoms::label || aTag == nsXULAtoms::description) {
|
||||
nsAutoString value;
|
||||
if (aContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::value, value) ==
|
||||
NS_CONTENT_ATTR_NOT_THERE)
|
||||
return NS_OK;
|
||||
if ((aTag == nsHTMLAtoms::label || aTag == nsXULAtoms::description) &&
|
||||
(! aContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::value))) {
|
||||
return NS_OK;
|
||||
}
|
||||
rv = NS_NewTextBoxFrame(aPresShell, &newFrame);
|
||||
}
|
||||
|
|
|
@ -5077,11 +5077,9 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
|
|||
else if (aTag == nsXULAtoms::text || aTag == nsHTMLAtoms::label ||
|
||||
aTag == nsXULAtoms::description) {
|
||||
isReplaced = PR_TRUE;
|
||||
if (aTag == nsHTMLAtoms::label || aTag == nsXULAtoms::description) {
|
||||
nsAutoString value;
|
||||
if (aContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::value, value) ==
|
||||
NS_CONTENT_ATTR_NOT_THERE)
|
||||
return NS_OK;
|
||||
if ((aTag == nsHTMLAtoms::label || aTag == nsXULAtoms::description) &&
|
||||
(! aContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::value))) {
|
||||
return NS_OK;
|
||||
}
|
||||
rv = NS_NewTextBoxFrame(aPresShell, &newFrame);
|
||||
}
|
||||
|
|
|
@ -872,11 +872,10 @@ HTMLStyleSheetImpl::HasStateDependentStyle(StateRuleProcessorData* aData,
|
|||
aData->mStyledContent &&
|
||||
aData->mIsHTMLContent &&
|
||||
aData->mContentTag == nsHTMLAtoms::a) {
|
||||
nsAutoString href;
|
||||
nsresult attrState =
|
||||
aData->mStyledContent->GetAttr(kNameSpaceID_None,
|
||||
nsHTMLAtoms::href, href);
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == attrState)
|
||||
PRBool hasHrefAttr =
|
||||
aData->mStyledContent->HasAttr(kNameSpaceID_None,
|
||||
nsHTMLAtoms::href);
|
||||
if (hasHrefAttr)
|
||||
result = NS_OK; // yes, style will depend on link state
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче