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

This commit is contained in:
Timothy Nikkel 2010-04-10 13:03:40 -05:00
parent 71ec391ab2
commit 51038eecce
2 changed files with 2 additions and 23 deletions

View File

@ -1357,27 +1357,6 @@ nsPresContext::GetContainerExternal() const
} }
#ifdef IBMBIDI #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 void
nsPresContext::SetBidiEnabled() const nsPresContext::SetBidiEnabled() const
{ {

View File

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