Closed Bug 488696 Opened 11 years ago Closed 11 years ago

Only one tooltip shown for trees

Categories

(Core :: XUL, defect, major)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: polidobj, Assigned: jmorkel)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Only one tooltip is shown in the sidebars and in the library in Firefox. AFAICT this affects just trees.  If the mouse cursor leaves the tree and reenters then one tooltip is shown again and no more.  

This started with the 4-13 nightly.
Just in case:
STR
Hover over an item that is not fully shown: a tooltip is shown.
Hover over another item that is not fully shown: no tooltip.
Severity: normal → major
Flags: blocking1.9.2?
This patch prevents tree titletips from disappearing after moving the mouse more than 7 pixels and then not reappearing until the mouse leaves and re-enters the tree. This behaviour was introduced by the patch in bug 395668.

This patch results in the tree titletips (not regular tooltips) staying visible until the mouse leaves the row/column that is currently displaying the titletip.
Attachment #373171 - Flags: superreview?(neil)
Attachment #373171 - Flags: review?(enndeakin)
Attachment #373171 - Flags: review?(enndeakin) → review+
Comment on attachment 373171 [details] [diff] [review]
Fixes regression in tree titletips

>   } else {
>+#ifdef MOZ_XUL
>+    if (mIsSourceTree)
>+      return NS_OK;
>+#endif
>     HideTooltip();
>     // set a flag so that the tooltip is only displayed once until the mouse
>     // leaves the node
>     mTooltipShownOnce = PR_TRUE;
>   }
> 
>   return NS_OK;
> }
This mixture of styles looks ugly; an alternative you might consider:
  if (!currentTooltip && !mTooltipShownOnce) {
    ...
    return NS_OK;
  }

#ifdef MOZ_XUL
  if (mIsSourceTree)
    return NS_OK;
#endif

  HideTooltip();
  ...
  return NS_OK;
Or possibly:
  if (!currentTooltip && !mTooltipShownOnce) {
    ...
  } else
#ifdef MOZ_XUL
         if (mIsSourceTree)
#endif
                            {
    HideTooltip();
    ...
  }
  return NS_OK;
Attachment #373171 - Flags: superreview?(neil) → superreview+
Made the code prettier and easier to follow as per Neil's suggestion in #3.
Attachment #373171 - Attachment is obsolete: true
Attachment #373574 - Flags: superreview?(neil)
Attachment #373574 - Flags: review?(enndeakin)
Attachment #373574 - Flags: superreview?(neil) → superreview+
Attachment #373574 - Flags: review?(enndeakin) → review+
Assignee: nobody → jmorkel
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/1bf4c02561a2
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: blocking1.9.2?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Component: General → XUL
OS: Windows XP → All
QA Contact: general → xptoolkit.widgets
Hardware: x86 → All
Testing with build: 
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090420 Minefield/3.6a1pre Firefox/3.0.7 ID:20090420165750 

with the patch, it appears its not 'fully' fixed as after a few mouse-overs of bookmarks in the side bar it quits showing the tooltip.  Mousing over a few more in a list or waiting a few seconds it seems to start working again, maybe for 5-6 times then quits again...Same with History in the side-bar - intermittent.

Not going to re-open till someone else can verify its not something on my end.
Comment on attachment 373574 [details] [diff] [review]
Prettier code that doesn't mix up #ifdefs and ifs

This patch fixes a regression introduced by the patch for bug 395668 which has been marked for approval1.9.1.
Attachment #373574 - Flags: approval1.9.1?
Comment on attachment 373574 [details] [diff] [review]
Prettier code that doesn't mix up #ifdefs and ifs

We're not taking the tooltip fix on 191, so don't need to take this regression fix, either.
Attachment #373574 - Flags: approval1.9.1? → approval1.9.1-
You need to log in before you can comment on or make changes to this bug.