Closed Bug 690068 Opened 13 years ago Closed 13 years ago

highlighter and infobar should not be visible if node is not highlightable

Categories

(DevTools :: General, defect)

9 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 10

People

(Reporter: dcamp, Assigned: paul)

References

Details

Attachments

(2 files)

      No description provided.
Also, it feels like the box animates while it shrinks down to that pixel size, aren't the animations disabled while locked?
Assignee: nobody → paul
I found another situation where the highlighter and/or the infobar are still visible when they should not (selecting a non-highlightable node after a highlightable node).
Summary: Tiny highlighter rect still visible when element is scrolled offscreen. → highlighter and infobar should not be visible if node is not highlightable
I think the infobar should be move to the top/left corner, bot be hidden.
Attached patch patch v1Splinter Review
- hide the highlighter borders if node not highlitable
- move the infobar to the top-left corner if node not highlitable
Attachment #566151 - Flags: review?(rcampbell)
Status: NEW → ASSIGNED
Comment on attachment 566151 [details] [diff] [review]
patch v1

     // node is not set or node is not highlightable, bail
-    if (!this.node || !this.isNodeHighlightable(this.node)) {
-      return;
-    }
+    if (this.node && this.isNodeHighlightable(this.node)) {

I think I'd prefer to bail out early rather than nest the remainder of this method in an if { } block.

r+ with that reverted.
Attachment #566151 - Flags: review?(rcampbell) → review+
Well, actually, we don't want to bail out here. We want to execute:

>    this.highlightRectangle(rect);
>    this.moveInfobar();

(after the if block).

I think here I should only remove the comment.
Blocks: 663830
(In reply to Paul Rouget [:paul] from comment #6)
> Well, actually, we don't want to bail out here. We want to execute:
> 
> >    this.highlightRectangle(rect);
> >    this.moveInfobar();
> 
> (after the if block).
> 
> I think here I should only remove the comment.

OK, fair enough.

One thing I would like to see fixed though is the while(true) block. Can we replace that with something like:

while (!(frameWin.parent === frameWin || !frameWin.frameElement)) {

?

or do { ... } while() ?
(In reply to Rob Campbell [:rc] (robcee) from comment #7)
> (In reply to Paul Rouget [:paul] from comment #6)
> > Well, actually, we don't want to bail out here. We want to execute:
> > 
> > >    this.highlightRectangle(rect);
> > >    this.moveInfobar();
> > 
> > (after the if block).
> > 
> > I think here I should only remove the comment.
> 
> OK, fair enough.
> 
> One thing I would like to see fixed though is the while(true) block. Can we
> replace that with something like:
> 
> while (!(frameWin.parent === frameWin || !frameWin.frameElement)) {
> 
> ?
> 
> or do { ... } while() ?

I don't see how I could do that.
ok, after another look, it looks like it'll be a pain to move that around, so don't worry about it.
Attached patch patch v1.1Splinter Review
removed the comfusing comment
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/f9644e6e81d5
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/f9644e6e81d5
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 10
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: