Reduce code duplication in AutoCompleteCell drawHighlightInRect: (autocomplete window menu highlighting)



Camino Graveyard
Location Bar & Autocomplete
8 years ago
7 years ago


(Reporter: Smokey Ardisson (offline for a while; not following bugs - do not email), Unassigned)


Mac OS X


Bug 504874 comment 8:

> (From update of attachment 423264 [details] [diff] [review])
> >+    NSRectFill(NSMakeRect(rect.origin.x, rect.origin.y - 1, rect.size.width, 1));
> >+    [bottomColor set];
> >+    NSRectFill(NSMakeRect(rect.origin.x, rect.origin.y - 1 + rect.size.height + 1, rect.size.width, 1));
> It might make sense to reduce the duplication here by making the first rect
> outside the fill call, and then just changing its y origin and re-using it in
> the second fill, since everything else is the same.
> Not a big deal though (especially since it's not new code); r=me either way.
Chris, is your hovering patch refactoring in bug 506733 taking care of this?
No. I'm hesitant to add any more changes to that patch, so we should leave this bug open.
Sorry, I phrased comment 1 poorly; I wasn't advocating adding this to bug 506733, only inquiring as to whether that bug happened to do so as a consequence of the things you were already doing there ;)  So, yes, let's leave this for another day.
You need to log in before you can comment on or make changes to this bug.