const nsStyleTextReset* text = nsnull; GetStyleData(eStyleStruct_TextReset, (const nsStyleStruct*&)text, aFrame);  if (text) { if (NS_STYLE_TEXT_DECORATION_NONE == text->mTextDecoration) { const nsAFlatCString& decoration= nsCSSKeywords::GetStringValue(eCSSKeyword_none); val->SetIdent(decoration); } else { nsAutoString decorationString; if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_UNDERLINE) { const nsAFlatCString& decoration= nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_UNDERLINE, nsCSSProps::kTextDecorationKTable); decorationString.AppendWithConversion(decoration.get()); } if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_OVERLINE) { if (!decorationString.IsEmpty()) { decorationString.Append(PRUnichar(' ')); } const nsAFlatCString& decoration= nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_OVERLINE, nsCSSProps::kTextDecorationKTable); decorationString.AppendWithConversion(decoration.get()); } if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) { if (!decorationString.IsEmpty()) { decorationString.Append(PRUnichar(' ')); } const nsAFlatCString& decoration= nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_LINE_THROUGH, nsCSSProps::kTextDecorationKTable); decorationString.AppendWithConversion(decoration.get()); } if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) { if (!decorationString.IsEmpty()) { decorationString.Append(PRUnichar(' ')); } const nsAFlatCString& decoration= nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_BLINK, nsCSSProps::kTextDecorationKTable); decorationString.AppendWithConversion(decoration.get()); } val->SetString(decorationString); }
const nsStyleText* text=nsnull; GetStyleData(eStyleStruct_Text,(const nsStyleStruct*&)text,aFrame);  if(text) { const nsCString& decoration= nsCSSProps::SearchKeywordTable(text->mTextDecoration, nsCSSProps::kTextDecorationKTable); val->SetString(decoration);
nsComputedDOMStyle::GetTextDecoration(nsIFrame *aFrame,                                      nsIDOMCSSValue** aValue){  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  const nsStyleTextReset* text = nsnull;  GetStyleData(eStyleStruct_TextReset, (const nsStyleStruct*&)text, aFrame);  if (text) {    if (NS_STYLE_TEXT_DECORATION_NONE == text->mTextDecoration) {      const nsAFlatCString& decoration=        nsCSSKeywords::GetStringValue(eCSSKeyword_none);      val->SetIdent(decoration);    } else {      nsAutoString decorationString;      if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_UNDERLINE) {        const nsAFlatCString& decoration=          nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_UNDERLINE,                                         nsCSSProps::kTextDecorationKTable);        decorationString.AppendWithConversion(decoration.get());      }      if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_OVERLINE) {        if (!decorationString.IsEmpty()) {          decorationString.Append(PRUnichar(' '));        }        const nsAFlatCString& decoration=          nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_OVERLINE,                                         nsCSSProps::kTextDecorationKTable);        decorationString.AppendWithConversion(decoration.get());      }      if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) {        if (!decorationString.IsEmpty()) {          decorationString.Append(PRUnichar(' '));        }        const nsAFlatCString& decoration=          nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_LINE_THROUGH,                                         nsCSSProps::kTextDecorationKTable);        decorationString.AppendWithConversion(decoration.get());      }      if (text->mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) {        if (!decorationString.IsEmpty()) {          decorationString.Append(PRUnichar(' '));        }        const nsAFlatCString& decoration=          nsCSSProps::SearchKeywordTable(NS_STYLE_TEXT_DECORATION_BLINK,                                         nsCSSProps::kTextDecorationKTable);        decorationString.AppendWithConversion(decoration.get());      }      val->SetString(decorationString);    }  }  return CallQueryInterface(val, aValue);}