Last Comment Bug 690068 - highlighter and infobar should not be visible if node is not highlightable
: highlighter and infobar should not be visible if node is not highlightable
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: 9 Branch
: All All
: -- normal (vote)
: Firefox 10
Assigned To: Paul Rouget [:paul]
:
Mentors:
Depends on:
Blocks: 663830
  Show dependency treegraph
 
Reported: 2011-09-28 13:48 PDT by Dave Camp (:dcamp)
Modified: 2011-10-22 12:14 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v1 (6.64 KB, patch)
2011-10-11 02:35 PDT, Paul Rouget [:paul]
rcampbell: review+
Details | Diff | Splinter Review
patch v1.1 (6.91 KB, patch)
2011-10-20 09:08 PDT, Paul Rouget [:paul]
no flags Details | Diff | Splinter Review

Description Dave Camp (:dcamp) 2011-09-28 13:48:02 PDT

    
Comment 1 Dave Camp (:dcamp) 2011-09-28 13:53:51 PDT
Also, it feels like the box animates while it shrinks down to that pixel size, aren't the animations disabled while locked?
Comment 2 Paul Rouget [:paul] 2011-10-11 01:58:07 PDT
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).
Comment 3 Paul Rouget [:paul] 2011-10-11 02:03:59 PDT
I think the infobar should be move to the top/left corner, bot be hidden.
Comment 4 Paul Rouget [:paul] 2011-10-11 02:35:36 PDT
Created attachment 566151 [details] [diff] [review]
patch v1

- hide the highlighter borders if node not highlitable
- move the infobar to the top-left corner if node not highlitable
Comment 5 Rob Campbell [:rc] (:robcee) 2011-10-11 13:36:19 PDT
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.
Comment 6 Paul Rouget [:paul] 2011-10-12 01:20:38 PDT
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.
Comment 7 Rob Campbell [:rc] (:robcee) 2011-10-17 09:12:28 PDT
(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() ?
Comment 8 Paul Rouget [:paul] 2011-10-17 09:23:02 PDT
(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.
Comment 9 Rob Campbell [:rc] (:robcee) 2011-10-17 10:06:53 PDT
ok, after another look, it looks like it'll be a pain to move that around, so don't worry about it.
Comment 10 Paul Rouget [:paul] 2011-10-20 09:08:15 PDT
Created attachment 568414 [details] [diff] [review]
patch v1.1

removed the comfusing comment
Comment 11 Rob Campbell [:rc] (:robcee) 2011-10-20 14:23:18 PDT
https://hg.mozilla.org/integration/fx-team/rev/f9644e6e81d5
Comment 12 Tim Taubert [:ttaubert] (on PTO, back Aug 29th) 2011-10-22 12:14:38 PDT
https://hg.mozilla.org/mozilla-central/rev/f9644e6e81d5

Note You need to log in before you can comment on or make changes to this bug.