Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz

MozReview-Commit-ID: 8JZuS6O8f8W
This commit is contained in:
Emilio Cobos Álvarez
2017-12-07 19:13:50 +01:00
parent fda174ec22
commit b3956b6171
175 changed files with 1710 additions and 1399 deletions

View File

@@ -344,14 +344,18 @@ nsDateTimeControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
if (inputAreaContent) {
// Propogate our tabindex.
nsAutoString tabIndexStr;
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::tabindex, tabIndexStr)) {
if (mContent->AsElement()->GetAttr(kNameSpaceID_None,
nsGkAtoms::tabindex,
tabIndexStr)) {
inputAreaContent->SetEditAttribute(NS_LITERAL_STRING("tabindex"),
tabIndexStr);
}
// Propagate our readonly state.
nsAutoString readonly;
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::readonly, readonly)) {
if (mContent->AsElement()->GetAttr(kNameSpaceID_None,
nsGkAtoms::readonly,
readonly)) {
inputAreaContent->SetEditAttribute(NS_LITERAL_STRING("readonly"),
readonly);
}
@@ -429,7 +433,7 @@ nsDateTimeControlFrame::AttributeChanged(int32_t aNameSpaceID,
if (inputAreaContent) {
nsAtomString name(aAttribute);
nsAutoString value;
mContent->GetAttr(aNameSpaceID, aAttribute, value);
contentAsInputElem->GetAttr(aNameSpaceID, aAttribute, value);
inputAreaContent->SetEditAttribute(name, value);
}
}