nsCOMPtr<nsIPresShell> shell; aPresContext->GetShell(getter_AddRefs(shell));
nsresult rv; nsCOMPtr<nsIBox> box = do_QueryInterface(aFrame, &rv); if (NS_SUCCEEDED(rv) && box) { nsBoxLayoutState state(aPresContext); box->MarkStyleChange(state); } else { nsCOMPtr<nsIPresShell> shell; aPresContext->GetShell(getter_AddRefs(shell));
StyleChangeReflow(nsIPresContext* aPresContext,                  nsIFrame* aFrame,                  nsIAtom * aAttribute){  nsCOMPtr<nsIPresShell> shell;  aPresContext->GetShell(getter_AddRefs(shell));     nsIReflowCommand* reflowCmd;  nsresult rv = NS_NewHTMLReflowCommand(&reflowCmd, aFrame,                                        nsIReflowCommand::StyleChanged,                                        nsnull,                                        aAttribute);  if (NS_SUCCEEDED(rv)) {    shell->AppendReflowCommand(reflowCmd);    NS_RELEASE(reflowCmd);  }    /*    nsFrameState state;    aFrame->GetFrameState(&state);    state |= NS_FRAME_IS_DIRTY;    aFrame->SetFrameState(state);    nsIFrame* parent;    aFrame->GetParent(&parent);    parent->ReflowDirtyChild(shell, aFrame);*/}