Bug 598833 part 1. Move IntrinsicState from nsIContent to Element. r=smaug

This commit is contained in:
Boris Zbarsky
2011-05-31 21:46:56 -04:00
parent 845f5086ad
commit f6944f63f4
14 changed files with 68 additions and 50 deletions

View File

@@ -591,7 +591,7 @@ nsFileControlFrame::SyncAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
void
nsFileControlFrame::SyncDisabledState()
{
nsEventStates eventStates = mContent->IntrinsicState();
nsEventStates eventStates = mContent->AsElement()->IntrinsicState();
if (eventStates.HasState(NS_EVENT_STATE_DISABLED)) {
mTextContent->SetAttr(kNameSpaceID_None, nsGkAtoms::disabled, EmptyString(),
PR_TRUE);
@@ -704,7 +704,7 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Disabled file controls don't pass mouse events to their children, so we
// put an invisible item in the display list above the children
// just to catch events
nsEventStates eventStates = mContent->IntrinsicState();
nsEventStates eventStates = mContent->AsElement()->IntrinsicState();
if (eventStates.HasState(NS_EVENT_STATE_DISABLED) && IsVisibleForPainting(aBuilder)) {
rv = aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));