Closed
Bug 361545
Opened 19 years ago
Closed 18 years ago
Last line not selected when dragging downwards to following whitespace, in certain cases of Bidi with letter-spacing, word-spacing, etc.
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: uriber, Assigned: uriber)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
|
1.87 KB,
patch
|
Details | Diff | Splinter Review |
This is a spin-off from bug 361229.
In the linked testcase, start selecting from somewhere in the right-side section of the text, and drag downwards to the space to the right of the last line (but not below it!).
The last line should be selected, but is not.
This happens when the text ends with a whitespace-only bidi continuation frame, and is styled in a way that causes GetPositionSlowly() to be invoked (e.g., using word-spacing or letter-spacing).
The cause of this is given in (perhaps too much) detail in bug 361229 comment 4 (stages 1-9 are those relevant to this bug). The short version is:
- nsTextFrame::IsEmpty() does not consider the whitespace continuation frame to be empty, so GetSelectionClosestFrame() returns it.
- GetPositionSlowly() is then called for this frame. It /does/ consider the frame to be empty, and therefore fails (returns null).
I'm not sure what's the right way to fix this, and I probably won't have much time to do it anyway, so help is welcomed here.
| Assignee | ||
Comment 1•19 years ago
|
||
I guess we can fix it by not failing on empty frames in GetPositionSlowly() - I noticed that I had introduced the exact same change to GetPositionHelper() in bug 298690 (for different reasons).
Rob, is this worth getting in, or is this method going to be blown out by your nsTextFrame rewrite anyway?
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #246320 -
Flags: superreview?(roc)
Attachment #246320 -
Flags: review?(roc)
Let's hold off until new textframe is on. At that point we'll have to deal with a completely different set of textframe bugs.
| Assignee | ||
Comment 3•18 years ago
|
||
WFM now, presumably fixed by the new TextFrame.
Comment 4•18 years ago
|
||
Every cloud has a silver lining I guess...
Updated•18 years ago
|
Flags: in-testsuite?
Attachment #246320 -
Flags: superreview?(roc)
Attachment #246320 -
Flags: review?(roc)
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
•