Bug 1389029 - Create custom change hint and post restyle event for rowspan, colspan attribute changes. r=dbaron

MozReview-Commit-ID: IwUlgDa3DAj
This commit is contained in:
Neerja Pancholi
2017-09-05 13:30:40 -07:00
parent 0d32baa271
commit bb48ee0cd8
7 changed files with 61 additions and 33 deletions

View File

@@ -230,8 +230,12 @@ nsTableCellFrame::AttributeChanged(int32_t aNameSpaceID,
PresContext()->PresShell()->
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
}
// let the table frame decide what to do
GetTableFrame()->AttributeChangedFor(this, mContent, aAttribute);
if (aAttribute == nsGkAtoms::rowspan || aAttribute == nsGkAtoms::colspan) {
nsLayoutUtils::PostRestyleEvent(mContent->AsElement(),
nsRestyleHint(0),
nsChangeHint_UpdateTableCellSpans);
}
return NS_OK;
}