Cache toolbar items as they are created

NEW
Unassigned

Status

11 years ago
8 years ago

People

(Reporter: stuart.morgan+bugzilla, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
Created attachment 278325 [details] [diff] [review]
fix

While investigating bug 235910 I wrote a toolbar item cache, and while it didn't fix that bug it's still what the docs recommend, so there's no real reason not to go ahead and land it.
Attachment #278325 - Flags: review?(murph)

Comment 1

11 years ago
Comment on attachment 278325 [details] [diff] [review]
fix

Need to declare mCachedToolbarItems in the header file.

More importantly though, there's some weirdness with our custom back/forward icons (probably related to the fact that the version that gets cached is explicitly 32x32).  STR:

1. Make the toolbar have small icons
2. Customize toolbar

What happens: back/fwd buttons both in the customize sheet and on the real toolbar are too big, and get clipped at the edges.
Attachment #278325 - Flags: review?(murph) → review-
(Reporter)

Comment 2

11 years ago
So that the reason this bug exists is here, rather than just in bug 235910:

The docs for toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: say:
"This method is called lazily on behalf of a toolbar instance, which must be the sole owner of the toolbar item. A toolbar may ask again for a kind of toolbar item already supplied to it, in which case this method can and should return the same toolbar item it returned before."
Assignee: stuart.morgan → nobody
You need to log in before you can comment on or make changes to this bug.