Bug 222436. Simplify nsPresContext::BidiEnabled. r=roc

This commit is contained in:
Timothy Nikkel 2010-04-10 13:03:40 -05:00
parent 7ce43e1d3e
commit 2785965e97
2 changed files with 2 additions and 23 deletions

View File

@ -1357,27 +1357,6 @@ nsPresContext::GetContainerExternal() const
}
#ifdef IBMBIDI
PRBool
nsPresContext::BidiEnabledInternal() const
{
PRBool bidiEnabled = PR_FALSE;
NS_ASSERTION(mShell, "PresShell must be set on PresContext before calling nsPresContext::GetBidiEnabled");
if (mShell) {
nsIDocument *doc = mShell->GetDocument();
NS_ASSERTION(doc, "PresShell has no document in nsPresContext::GetBidiEnabled");
if (doc) {
bidiEnabled = doc->GetBidiEnabled();
}
}
return bidiEnabled;
}
PRBool
nsPresContext::BidiEnabledExternal() const
{
return BidiEnabledInternal();
}
void
nsPresContext::SetBidiEnabled() const
{

View File

@ -685,8 +685,8 @@ public:
*
* @lina 07/12/2000
*/
virtual NS_HIDDEN_(PRBool) BidiEnabledExternal() const;
NS_HIDDEN_(PRBool) BidiEnabledInternal() const;
virtual PRBool BidiEnabledExternal() const { return BidiEnabledInternal(); }
PRBool BidiEnabledInternal() const { return Document()->GetBidiEnabled(); }
#ifdef _IMPL_NS_LAYOUT
PRBool BidiEnabled() const { return BidiEnabledInternal(); }
#else