Fix regression with form controls on visual bidi pages. Bug 142233, r=jkeiser, sr=kin
git-svn-id: svn://10.0.0.236/trunk@124915 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -62,7 +62,6 @@
|
||||
#include "nsTextFragment.h"
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiUtils.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsITextFrame.h"
|
||||
#define FIX_FOR_BUG_40882
|
||||
#endif // IBMBIDI
|
||||
@@ -1048,30 +1047,12 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
#ifdef IBMBIDI
|
||||
PRBool bidiEnabled;
|
||||
mPresContext->GetBidiEnabled(&bidiEnabled);
|
||||
PRBool visual;
|
||||
PRBool setMode = PR_FALSE;
|
||||
PRInt32 start, end;
|
||||
|
||||
if (bidiEnabled) {
|
||||
if (state & NS_FRAME_IS_BIDI) {
|
||||
aFrame->GetOffsets(start, end);
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsIFormControlFrame> formFrame(do_QueryInterface(aFrame) );
|
||||
if (formFrame) {
|
||||
mPresContext->IsVisualMode(visual);
|
||||
|
||||
PRUint32 options;
|
||||
mPresContext->GetBidi(&options);
|
||||
if ( (IBMBIDI_CONTROLSTEXTMODE_VISUAL == GET_BIDI_OPTION_CONTROLSTEXTMODE(options)
|
||||
&& !visual)
|
||||
|| (IBMBIDI_CONTROLSTEXTMODE_LOGICAL == GET_BIDI_OPTION_CONTROLSTEXTMODE(options)
|
||||
&& visual) ) {
|
||||
mPresContext->SetVisualMode(!visual);
|
||||
setMode = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
|
||||
@@ -1084,12 +1065,6 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef IBMBIDI
|
||||
if (setMode) {
|
||||
mPresContext->SetVisualMode(visual);
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
|
||||
// SEC: added this next block for bug 45152
|
||||
// text frames don't know how to invalidate themselves on initial reflow. Do it for them here.
|
||||
// This only shows up in textareas, so do a quick check to see if we're inside one
|
||||
|
||||
Reference in New Issue
Block a user