Closed
Bug 312550
Opened 20 years ago
Closed 20 years ago
Incorrect wrapping in RTL textarea with horizontal scrollbar
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: uriber, Assigned: uriber)
References
Details
(5 keywords)
Attachments
(3 files)
|
367 bytes,
text/html
|
Details | |
|
1.19 KB,
patch
|
smontagu
:
review+
roc
:
superreview+
dveditz
:
approval1.8.0.1+
dveditz
:
approval1.8.1+
|
Details | Diff | Splinter Review |
|
584 bytes,
text/html
|
Details |
When an RTL textarea has a horizontal scrollbar (because one of the lines is
unbreakable and too wide to fit in the textarea), the rest of the text wraps
incrorrectly, i.e, it wraps according to the width of the longest line, instead
of the width of the textarea itself. This does not happen in LTR textareas.
Testcase coming up.
| Assignee | ||
Comment 1•20 years ago
|
||
Notice that in the LTR textarea, the second line wraps after "33333", whereas
in the RTL textarea it only wraps after "66666".
Also, the initial position of the scrollbar on the RTL textarea is wrong - but
that might be a separate bug.
| Assignee | ||
Comment 2•20 years ago
|
||
This patch (removing some bidi-specific code overriding the normal available width for lreflowing lines) fixes this bug, as well as bug 306349 and bug 313365.
The downside is that unbreakable lines which are too long to fit in the textarea now extend to the right, instead of to the left. However, I believe that this is not really a new problem being introduced, as I can see the same thing in fixed-width RTL DIVs. Also, the overall adverse effect of this is, IMO, much less than the combined effect of the three resolved bugs.
Simon - do you remember why this code was added in the first place? Can you think of more things that would break if it's removed?
Attachment #204126 -
Flags: review?(smontagu)
| Assignee | ||
Updated•20 years ago
|
| Assignee | ||
Comment 3•20 years ago
|
||
Following Simon's suggestion, I checked the testcases for bug 108187 and bug 131023, and neither of them is regressed (or otherwise affected) by this patch.
| Assignee | ||
Comment 4•20 years ago
|
||
This testcase contains an RTL textarea (similar to the first testcase), and an RTL DIV, with fixed width and scroll:auto.
The patch causes the textarea to behave the way the DIV currently behaves (text wraps on correct width, but the overflowing line extends to the right instead of the left).
The patch does not affect the rendering of the DIV.
Comment 5•20 years ago
|
||
Comment on attachment 204126 [details] [diff] [review]
patch?
I believe that this code worked together with IBMBIDI code in nsGfxScrollFrame.cpp which was removed in bug 240276, so it should go.
Attachment #204126 -
Flags: review?(smontagu) → review+
| Assignee | ||
Comment 6•20 years ago
|
||
Comment on attachment 204126 [details] [diff] [review]
patch?
ROC, notice that this patch makes your XXX comment in http://lxr.mozilla.org/seamonkey/source/layout/generic/nsGfxScrollFrame.cpp#793
("the way this works...") obsolete (which is a good thing. That behavior was annoying). Perhaps there is additional bidi code in nsGfxScrollFrame which can now be removed or simplified?
Attachment #204126 -
Flags: superreview?(roc)
| Assignee | ||
Comment 7•20 years ago
|
||
I submitted the problem I mentioned in comment #2 as bug 318116 (which is focused on DIVs - but I think that this is the same problem we have with texareas with the proposed patch here).
Attachment #204126 -
Flags: superreview?(roc) → superreview+
Do you want me to check this in? (or are you getting CVS access real soon?)
| Assignee | ||
Comment 9•20 years ago
|
||
(In reply to comment #8)
> Do you want me to check this in? (or are you getting CVS access real soon?)
I was hoping for this to be my first checkin with my account when I get it, but I spoke to Marcia today and she still seems to be very busy - so I'll take you up on checking this in for me, and I'll have to come up with another patch to test-drive my account on. Thanks.
| Assignee | ||
Comment 10•20 years ago
|
||
Patch checked in:
Checking in layout/generic/nsBlockFrame.cpp;
/cvsroot/mozilla/layout/generic/nsBlockFrame.cpp,v <-- nsBlockFrame.cpp
new revision: 3.749; previous revision: 3.748
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•20 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Updated•20 years ago
|
Assignee: mozilla → uriber
Status: REOPENED → NEW
Flags: blocking1.8.1?
| Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Comment 11•20 years ago
|
||
Would this be suitablel for the branch (so Camino can pick it up)?
| Assignee | ||
Comment 12•20 years ago
|
||
(In reply to comment #11)
> Would this be suitablel for the branch (so Camino can pick it up)?
Since nobody else answered, I'll state my opinion: I think this can, and should, get on the 1.8 branch. I even consider nominating it for the 1.8.0.x branch (once it's on the trunk for long enough).
Updated•19 years ago
|
Attachment #204126 -
Flags: approval1.8.1?
Attachment #204126 -
Flags: approval1.8.0.1?
| Assignee | ||
Comment 14•19 years ago
|
||
Note to 1.5.0.1 release drivers:
The patch is nominated for 1.8.0.1 no so much for fixing this bug, but mainly for fixing bug 313365, and (via bug 306349), bug 304609.
Both of these bugs are regressions in major functionality (typing into RTL textareas) from 1.0.x (more precisely, Gecko 1.7.x, since the latter only affects Camino).
The patch has been on the trunk since 2005-10-14 with no reported regressions so far.
The patch, by its nature, impacts only RTL textareas and input elements (which were tested), so the risk should be very limited.
There is no l10n impact and no API changes.
Updated•19 years ago
|
Keywords: regression
Comment 15•19 years ago
|
||
Comment on attachment 204126 [details] [diff] [review]
patch?
a=dveditz for 1.8/1.8.0.1 branches. Please add the fixed1.8.1 and fixed1.8.0.1 keywords when checked in.
Attachment #204126 -
Flags: approval1.8.1?
Attachment #204126 -
Flags: approval1.8.1+
Attachment #204126 -
Flags: approval1.8.0.1?
Attachment #204126 -
Flags: approval1.8.0.1+
| Assignee | ||
Comment 16•19 years ago
|
||
Checked into 1.8 and 1.8.0 branches:
Checking in layout/generic/nsBlockFrame.cpp;
/cvsroot/mozilla/layout/generic/nsBlockFrame.cpp,v <-- nsBlockFrame.cpp
new revision: 3.729.4.8; previous revision: 3.729.4.7
Checking in layout/generic/nsBlockFrame.cpp;
/cvsroot/mozilla/layout/generic/nsBlockFrame.cpp,v <-- nsBlockFrame.cpp
new revision: 3.729.4.7.2.1; previous revision: 3.729.4.7
Comment 17•19 years ago
|
||
v.fixed on 1.8.0.1 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060104 Firefox/1.5.0.1, wrapping looks correct with Uri's testcase.
Keywords: verified1.8.0.1
Updated•19 years ago
|
Keywords: fixed1.8.0.1
Comment 18•17 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: zach → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•