Closed Bug 892841 Opened 11 years ago Closed 11 years ago

Break out of the toolbox children loop when we find the palette

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: jaws, Assigned: jaws)

References

Details

(Whiteboard: [Australis:M8])

Attachments

(1 file)

In /browser/components/customizableui/content/toolbar.xml, // Searching for the toolbox palette in the toolbar binding because // toolbars are constructed first. let toolbox = this.toolbox; if (toolbox && !toolbox.palette) { for (let node of toolbox.children) { if (node.localName == "toolbarpalette") { // Hold on to the palette but remove it from the document. toolbox.palette = node; toolbox.removeChild(node); } } } We can break out of the loop once we find the palette. This would follow the same behavior that /toolkit/content/widgets/toolbar.xml already provides.
As comment #0 mentions, this is not just a perf issue but also one of correctness if somehow multiple palettes exist.
Attachment #774443 - Flags: review?(mnoorenberghe+bmo) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M8][fixed-in-ux] → [Australis:M8]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: