Closed
Bug 556432
Opened 15 years ago
Closed 15 years ago
Dragging a content selection shows non-selectable text in the drag feedback
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla2.0b2
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: testcase)
Attachments
(3 files)
549 bytes,
text/html
|
Details | |
8.07 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
8.11 KB,
patch
|
Details | Diff | Splinter Review |
From bug 39098 comment 74:
Bug 4: the drag feedback is wrong (the copied text is correct though) -
I've tracked this down to "info->mBuilder.SetPaintAllFrames();"
in PresShell::CreateRangePaintInfo():
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#5519
If I remove that line I get the correct drag feedback, but I'm
assuming it's there for a reason.
It was also noted in bug 166235 comment 3.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
The origin of SetPaintAllFrames appears to be
https://bugzilla.mozilla.org/show_bug.cgi?id=178513#c62
<quote>
There is a problem here --- out of flow frames won't get painted when the
selection contains the placeholder but the containing block for the out of flow
frames is not part of the selection. E.g. if you select some inline text that
contains a float. I'll attach a patch that provides a SetPaintAllFrames method
on the nsDisplayListBuilder (completely untested!) that should fix this.
</quote>
Keywords: testcase
Assignee | ||
Comment 3•15 years ago
|
||
Rename the mPaintAllFrames bit to mSelectedFramesOnly.
Set the bit when we're building display items for PresShell::RenderSelection.
Only include frames with NS_FRAME_SELECTED_CONTENT when the bit is set.
It passed TryServer unit tests, fwiw (I suspect poor test coverage here).
Assignee: nobody → matspal
Attachment #451159 -
Flags: review?(roc)
Comment on attachment 451159 [details] [diff] [review]
Patch rev. 1
+ if (aForPrimarySelection)
+ info->mBuilder.SetSelectedFramesOnly();
{}
}
-
- if (aBuilder->GetPaintAllFrames()) {
+ else if (aBuilder->GetSelectedFramesOnly() &&
} else if {
Attachment #451159 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Assignee | ||
Comment 6•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
You need to log in
before you can comment on or make changes to this bug.
Description
•