Closed
Bug 39346
Opened 25 years ago
Closed 25 years ago
GetOffsetFromWidget() doesn't return correct offset
Categories
(Core :: Web Painting, defect, P3)
Core
Web Painting
Tracking
()
VERIFIED
INVALID
People
(Reporter: mikepinkerton, Assigned: kmcclusk)
References
Details
There seems to be a big problem with GetOffsetFromWidget() that we are running
into in the mac d&d code for mailnews.
The problem is that in mailnews, the tree is a child view of a view that actually
has a widget, and the tree's view is not at 0,0 with respect to its parent.
When the code enters GetOffsetFromWidget(), it first goes to the parent and asks
if it has a widget (it does), so it just returns, never setting the out
parameters with the correct offsets. I tried changing it so that it starts at the
child view before asking the parent, but that causes other problems elsewhere.
Am I missing something here?
Reporter | ||
Comment 1•25 years ago
|
||
nominating for beta2. d&d in mailnews for mac is not very usable until this is
fixed.
Assignee | ||
Comment 2•25 years ago
|
||
The GetOffsetFromWidget method should be renamed to GetParentOffsetFromWidget.
That is how it is implemented and used.
In NS_IMETHODIMP nsView :: SynchWidgetSizePosition() there is some code which
calls GetOffsetFromWidget then adds in the nsView's mBounds to get the full
offset for the view instance.
GetOffsetFromWidget(&parx, &pary, pwidget);
NS_IF_RELEASE(pwidget);
PRInt32 x = NSTwipsToIntPixels(mBounds.x + parx, t2p);
PRInt32 y = NSTwipsToIntPixels(mBounds.y + pary, t2p);
Pink: If you do that for the d&d code does it solve the problem?
Reporter | ||
Comment 3•25 years ago
|
||
thanks kevin. my bad.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•