← Back to team overview

desktop-packages team mailing list archive

[Bug 584632]

 

I've done a little debugging.

On every mouse move event we get this:
 >>> Entering PresShell::HandleEvent, frame=06EA9488
PresShell::HandleEvent calling nsLayoutUtils::GetEventCoordinatesRelativeTo
PresShell::HandleEvent calling FindFrameTargetedByInputEvent
PresShell::HandleEvent assigning frame = target, frame=1DD7F010
=== about to call HandlePositionedEvent, frame=1DD7F010
=== in PresShell::HandlePositionedEvent, mCurrentEventContent/Frame=0D066380/1DD7F010
<<< Leaving PresShell::HandleEvent right after HandlePositionedEvent
(BTW, none of the frame numbers change when you move the cursor around. Unless you reload the page, they are always the same numbers).

Surely somewhere in there it works out what is under the cursor, since
when the cursor is over a link, things happen (cursor changes, link
target is displayed). Sadly, I haven't yet found that code.

If the button is clicked and released, we additionally get calls to HandlePress and HandleRelease
 >>> Entering PresShell::HandleEvent, frame=06EA9488
PresShell::HandleEvent calling nsLayoutUtils::GetEventCoordinatesRelativeTo
PresShell::HandleEvent calling FindFrameTargetedByInputEvent
PresShell::HandleEvent assigning frame = target, frame=1DD7F010
=== about to call HandlePositionedEvent, frame=1DD7F010
=== in PresShell::HandlePositionedEvent, mCurrentEventContent/Frame=0D066380/1DD7F010
=== in nsFrame::HandlePress
<<< Leaving PresShell::HandleEvent right after HandlePositionedEvent

 >>> Entering PresShell::HandleEvent, frame=06EA9488
PresShell::HandleEvent calling nsLayoutUtils::GetEventCoordinatesRelativeTo
PresShell::HandleEvent calling FindFrameTargetedByInputEvent
PresShell::HandleEvent assigning frame = target, frame=1DD7F010
=== about to call HandlePositionedEvent, frame=1DD7F010
=== in PresShell::HandlePositionedEvent, mCurrentEventContent/Frame=0D066380/1DD7F010
=== in nsFrame::HandleRelease
<<< Leaving PresShell::HandleEvent right after HandlePositionedEvent

Here is the stack from the HandlePress call:
nsFrame::HandlePress(<args>) Line 2776    C++
nsFrame::HandleEvent(<args>) Line 2562    C++
nsPresShellEventCB::HandleEvent(<args>) Line 507    C++
mozilla::EventTargetChainItem::HandleEventTargetChain(<args>) Line 346    C++
mozilla::EventDispatcher::Dispatch(<args>) Line 634    C++
PresShell::DispatchEventToDOM(<args>) Line 8168    C++
PresShell::HandleEventInternal(<args>) Line 8064    C++
PresShell::HandlePositionedEvent(<args>) Line 7896    C++
PresShell::HandleEvent(<args>) Line 7689    C++

As I said before, GetSelectionClosestFrameForLine is not called. The following statements I placed into the corresponding functions in nsFrame.cpp are not reached:
printf ("=== in GetSelectionClosestFrameForLine\n");
printf ("=== in GetSelectionClosestFrameForBlock\n");
printf ("=== in GetSelectionClosestFrame\n");
printf ("=== in nsIFrame::GetContentOffsetsFromPoint\n");

So the idea of discarding the BRFrame in GetSelectionClosestFrameForLine
is perhaps not viable.

Further suggestions appreciated. I'd really like to find the code that
identifies the element under the cursor. Also, is there a way to dump
out/print these data structures? How do you "print" an nsIFrame or an
nsBlockFrame?

Also, please answer the first question in comment #60 which suggested to
not change the selected frame but to tweak the "type in state" like IE
does. IE selects the DIV, but typing happens in the font of the
preceding text element in the line. That may be an alternate way to fix
the "lost font" problem that doesn't change existing selection
behaviour.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to thunderbird in Ubuntu.
https://bugs.launchpad.net/bugs/584632

Title:
  composer changes font mid email

Status in Mozilla Thunderbird Mail and News:
  Confirmed
Status in thunderbird package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: thunderbird

  As I'm typing my emails in Thunderbird, I can see what appears to be a
  font size change on screen, normally in the second line of text. The
  second line appear smaller than the first. It's barely perceptible, so
  half them time I think I am imagining it.

  Well, I've started Bccing to myself to check, and the emails I am
  receiving from myself are not only a different size, they're also a
  different font. Composer starts in some default serif, and by the
  second line is sans. I'd bee glad to email someone viz thunderbird,
  and also send along a screenshot of how it looks while I am typing.

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/584632/+subscriptions