Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user