const nsStyleDisplay* disp = GetStyleDisplay();
const nsStyleDisplay* disp = (const nsStyleDisplay*)GetStyleData(eStyleStruct_Display);
nsStyleContext::ApplyStyleFixups(nsPresContext* aPresContext){  // See if we have any text decorations.  // First see if our parent has text decorations.  If our parent does, then we inherit the bit.  if (mParent && mParent->HasTextDecorations())    mBits |= NS_STYLE_HAS_TEXT_DECORATIONS;  else {    // We might have defined a decoration.    const nsStyleTextReset* text = GetStyleTextReset();    if (text->mTextDecoration != NS_STYLE_TEXT_DECORATION_NONE &&        text->mTextDecoration != NS_STYLE_TEXT_DECORATION_OVERRIDE_ALL)      mBits |= NS_STYLE_HAS_TEXT_DECORATIONS;  }  // Correct tables.  const nsStyleDisplay* disp = GetStyleDisplay();  if (disp->mDisplay == NS_STYLE_DISPLAY_TABLE) {    // -moz-center and -moz-right are used for HTML's alignment    // This is covering the <div align="right"><table>...</table></div> case.    // In this case, we don't want to inherit the text alignment into the table.    const nsStyleText* text = GetStyleText();        if (text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_CENTER ||        text->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_RIGHT)    {      nsStyleText* uniqueText = (nsStyleText*)GetUniqueStyleData(eStyleStruct_Text);      uniqueText->mTextAlign = NS_STYLE_TEXT_ALIGN_DEFAULT;    }  }  // CSS2.1 section 9.2.4 specifies fixups for the 'display' property of  // the root element.  We can't implement them in nsRuleNode because we  // don't want to store all display structs that aren't 'block',  // 'inline', or 'table' in the style context tree on the off chance  // that the root element has its style reresolved later.  So do them  // here if needed, by changing the style data, so that other code  // doesn't get confused by looking at the style data.  if (!mParent) {    if (disp->mDisplay != NS_STYLE_DISPLAY_NONE &&        disp->mDisplay != NS_STYLE_DISPLAY_BLOCK &&        disp->mDisplay != NS_STYLE_DISPLAY_TABLE) {      nsStyleDisplay *mutable_display = NS_STATIC_CAST(nsStyleDisplay*,        GetUniqueStyleData(eStyleStruct_Display));      if (mutable_display->mDisplay == NS_STYLE_DISPLAY_INLINE_TABLE)        mutable_display->mDisplay = NS_STYLE_DISPLAY_TABLE;      else        mutable_display->mDisplay = NS_STYLE_DISPLAY_BLOCK;    }  }}