Closed
Bug 1152254
Opened 10 years ago
Closed 10 years ago
when dragging selected text in vertical writing modes, text that is not a complete element is missing from the drag image
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
See testcase. When some of the vertical text is selected, and then the user clicks-and-drags on the selected text to move/copy it, the drag image may not correctly show all the selected text.
Some examples:
(1) Select from "Et eam ullum" in the first paragraph to "Cu ornatus" in the last, thus including the entire vertical paragraph between. Drag the selected text. Result: OK.
(2) Select from "Et eam ullum" (1st para) to "Te eum nihil possim" within the vertical paragraph. Drag. Result: The drag-image text is truncated after the bold span.
(3) Select from "Et eam ullum" (1st para) to "Eius commodo" in the vertical paragraph. Drag. Result: None of the vertical text is rendered in the drag image.
(4) Select from "Dico prompta" to "cu qui" within the bold vertical text. Drag. Result: No drag image is rendered.
(5) Select from "Dico prompta" to "cu qui." within the bold vertical text by double-clicking the first word and then dragging to include the last word AND the following period. Drag. Result: OK.
(6) Select the same text, but by a SINGLE-click and drag from "Dico" to "qui.", so that selection is by character rather than by word. Drag. Result: No drag image.
Note that in all cases, the correct content is in fact being dragged, as can be verified by dropping into a target area/app that accepts dragged text.
Assignee | ||
Comment 1•10 years ago
|
||
This occurs because PresShell::ClipListToRange ends up returning a zero-width clipping area for the display list being rendered. So although we have the right display list for the fragment of text we want to render, we clip it all away.
Assignee | ||
Comment 2•10 years ago
|
||
With this patch I now get the expected drag images.
Attachment #8589573 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment 3•10 years ago
|
||
Comment on attachment 8589573 [details] [diff] [review]
Handle vertical text frames when clipping display list for drag image
Review of attachment 8589573 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsPresShell.cpp
@@ +4988,5 @@
>
> // the clip rectangle is determined by taking the the start and
> // end points of the range, offset from the reference frame.
> // Because of rtl, the end point may be to the left of the
> // start point, so x is set to the lowest value
Please edit the comment to reflect the changes to the code.
Attachment #8589573 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Blocks: enable-writing-mode-release
Comment 5•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•