Closed
Bug 333433
Opened 18 years ago
Closed 18 years ago
Typing an RTL character on the third line (and onwards) of an LTR textarea, on a pure LTR page, causes text duplication
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: uriber, Assigned: uriber)
References
Details
(Keywords: regression, rtl, testcase)
Attachments
(2 files, 1 obsolete file)
344 bytes,
text/html
|
Details | |
1.86 KB,
patch
|
smontagu
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
In a LTR textarea containing LTR text, on a page which has no RTL text at all on it, typing an RTL letter on the third line (and onwards) of the textarea, causes text duplication. I'll attach a testcase soon. This is a regression from bug 329878 (although I don't yet understand why).
Assignee | ||
Comment 1•18 years ago
|
||
Instructions included. I should have said that this requires the line to be the third line of wrapping text, with no linebreaks.
I reoroduced it on Windows XP. Please change OS and Hardware values to "All"
Assignee | ||
Comment 4•18 years ago
|
||
Set the NS_FRAME_IS_BIDI flag on existing fluid continuations being "left alone" for reuse by the line breaking code. Apparently that code needs to know it's dealing with bidi stuff. On a side note, I question the usefulness of the NS_FRAME_IS_BIDI flag, as in all cases I know of, it seems to be set for all the frames on a page which contains any RTL at all. This is why adding any RTL anywhere on the testcase would cause the bug to disappear - it would make all frames have the flag set anyway.
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #217857 -
Flags: superreview?(bzbarsky)
Attachment #217857 -
Flags: review?(smontagu)
Assignee | ||
Comment 5•18 years ago
|
||
Actually, I should probably do this for RemoveBidiContinuation as well. Sorry for the spam.
Attachment #217857 -
Attachment is obsolete: true
Attachment #217860 -
Flags: superreview?(bzbarsky)
Attachment #217860 -
Flags: review?(smontagu)
Attachment #217857 -
Flags: superreview?(bzbarsky)
Attachment #217857 -
Flags: review?(smontagu)
Comment 6•18 years ago
|
||
Comment on attachment 217860 [details] [diff] [review] patch v2 Looks ok, but if we can get rid of this state bit, we should!
Attachment #217860 -
Flags: superreview?(bzbarsky) → superreview+
Updated•18 years ago
|
Attachment #217860 -
Flags: review?(smontagu) → review+
Comment 7•18 years ago
|
||
(In reply to comment #4) > On a side note, I question the usefulness of the NS_FRAME_IS_BIDI flag, as in > all cases I know of, it seems to be set for all the frames on a page which > contains any RTL at all. It shouldn't be being set on frames in an LTR-only paragraph even if other paragraphs contain RTL. Is it?
Assignee | ||
Comment 8•18 years ago
|
||
(In reply to comment #7) > > It shouldn't be being set on frames in an LTR-only paragraph even if other > paragraphs contain RTL. Is it? > I double-checked, and it is. Resolve() is called on the LTR-only paragraph (should it be?), and it calls AdjustOffsetsForBidi(), which sets the flag.
Comment 9•18 years ago
|
||
> I double-checked, and it is. Resolve() is called on the LTR-only paragraph > (should it be?) If we don't call Resolve() we won't know whether it's an LTR-only paragraph. > and it calls AdjustOffsetsForBidi(), which sets the flag. That seems wrong to me. I think EnsureBidiContinuation() should be setting it.
Assignee | ||
Comment 10•18 years ago
|
||
Checked in: Checking in layout/base/nsBidiPresUtils.cpp; /cvsroot/mozilla/layout/base/nsBidiPresUtils.cpp,v <-- nsBidiPresUtils.cpp new revision: 1.76; previous revision: 1.75 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 11•18 years ago
|
||
(In reply to comment #9) > > That seems wrong to me. I think EnsureBidiContinuation() should be setting it. > I tracked this back to the patch on bug 74946, which added setting the flag on both branches of the |if ( (runLength > 0) && (runLength < fragmentLength) )|. As far as I can tell, the behaviour didn't change ever since that patch was landed.
Comment 12•18 years ago
|
||
I still think it's wrong :) The bit was originally supposed to mean "this frame either is a nextBidi or has a nextBidi"[1], though it is overloaded for TextBoxFrames to mean "this frame has some RTL content". Let's continue this discussion in a new bug. [1]http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/generic/nsIFrame.h&rev=3.316&mark=213-214#211
Comment 13•18 years ago
|
||
The new bug is bug 333500
Comment 14•16 years ago
|
||
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: layout.bidi → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•