Closed
Bug 880701
Opened 11 years ago
Closed 11 years ago
Add capability for PanelUI to ignore mutations
Categories
(Firefox :: Toolbars and Customization, defect)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
Firefox 28
People
(Reporter: bwinton, Assigned: mconley)
References
Details
(Whiteboard: [Australis:M7][User Research Build+])
Attachments
(1 file, 7 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
And that makes the first call to wrapToolbarItem take 60ms, which causes us to skip four frames, if my math works out…
Thoughts on how to fix it:
1) Have the PanelUI not resize itself on mutation if we're entering/leaving customize mode.
2) Use a document fragment to update all the toolbar items with their wrapped versions in one big swoop.
As a side note, I wonder if this is the cause for question #1 in bug 873060…
Updated•11 years ago
|
Blocks: australis-cust
Whiteboard: [Australis:M?]
Assignee | ||
Comment 1•11 years ago
|
||
I think we should try to slip a fix for this into the UR build if possible.
Assignee: nobody → mconley
No longer blocks: australis-cust
Whiteboard: [Australis:M?] → [Australis:M7][User Research Build+]
Assignee | ||
Comment 2•11 years ago
|
||
Hey Mike - can you maybe take a look at this?
Assignee: mconley → mdeboer
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 3•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
(We probably also want to do something similar on the transition out of Customize mode, when we unwrap the items…)
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 761027 [details] [diff] [review]
WIP: add transitioning property to CustomizeMode
Review of attachment 761027 [details] [diff] [review]:
-----------------------------------------------------------------
Just a drive-by - I don't think I like panelmultiview reaching into CustomizeMode like this.
Lots of the UI "prepares" itself before we go into customization mode. You can see that happening in browser/base/content/browser-customization.js. I think we might want to do something similar here. Alter panelUI.js so that it has customizationStart and customizationEnd functions, and have those called within browser-customization.js.
Those functions should do the manipulation of the panelmultiview - maybe calling a method on the minding, or (more likely) setting a property. Does that make sense?
Assignee | ||
Comment 6•11 years ago
|
||
Hey Mike,
I needed this bug in order to work on bug 881909, and I did some fiddling with it. In the end, I think this is what I need. I call startBatchUpdate and endBatchUpdate in my (soon to be posted) patch in bug 881909.
Hope it's cool if I yank this one from you!
-Mike
Assignee: mdeboer → mconley
Assignee | ||
Updated•11 years ago
|
Attachment #761027 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 761663 [details] [diff] [review]
Patch v1
How does this look, Jared? I'll actually be calling beginBatchUpdate and endBatchUpdate in bug 881909.
Attachment #761663 -
Flags: review?(jaws)
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 761663 [details] [diff] [review]
Patch v1
I've just realized that both this and my patch in bug 881909 don't apply cleanly to trunk. Let me fix that...
Attachment #761663 -
Flags: review?(jaws)
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #761663 -
Attachment is obsolete: true
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #762086 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Summary: CustomizeMode.wrapToolbarItem causes sync reflow (due to MutationObserver firing _syncContainerWithMainView in PanelUI.xml) → Add capability for PanelUI to ignore mutations
Assignee | ||
Comment 11•11 years ago
|
||
Updated the summary, since bug 881909 takes care of making sure we don't reflow when wrapping the items.
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 762099 [details] [diff] [review]
Patch v1.2
What do you think of this, Jared?
Attachment #762099 -
Flags: review?(jaws)
Comment 13•11 years ago
|
||
Comment on attachment 762099 [details] [diff] [review]
Patch v1.2
Review of attachment 762099 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/customizableui/content/panelUI.xml
@@ +88,5 @@
> <field name="_anchorElement">null</field>
> <field name="_mainViewHeight">0</field>
> <field name="_subViewObserver">null</field>
> <field name="_transitioning">false</field>
> + <field name="ignoreMutations">false</field>
This can be a property that calls disconnect or observe when it is set. That would also allow us to keep syncContainerWith*View private. It could also kick off the sync when ignoreMutations becomes true.
Attachment #762099 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Having ignoreMutations take care of connecting / disconnecting observers is kinda complicated...this is what it looks like.
Maybe I've been looking at this performance stuff for too long, but this looks pretty complicated. :/
Perhaps we can have the mutation observer functions check ignoreMutations instead?
Attachment #762099 -
Attachment is obsolete: true
Attachment #762162 -
Flags: feedback?(jaws)
Comment 15•11 years ago
|
||
Ok let's just go with Patch v1.2. Thanks for trying my recommendation.
Updated•11 years ago
|
Attachment #762162 -
Flags: feedback?(jaws)
Updated•11 years ago
|
Attachment #762099 -
Attachment is obsolete: false
Updated•11 years ago
|
Attachment #762162 -
Attachment is obsolete: true
Assignee | ||
Comment 16•11 years ago
|
||
I liked your suggestion about re-hiding the _sync functions, and I think I've found a happy medium here.
Attachment #762099 -
Attachment is obsolete: true
Assignee | ||
Comment 17•11 years ago
|
||
Comment on attachment 762213 [details] [diff] [review]
Patch v1.4
I *think* this is the least complicated solution. This way, in bug 881909, I can call ensureRegistered(true), and we don't call the _sync functions until CustomizeMode.enter/exit is ready.
Sorry to make you review this thing yet again. :/
Attachment #762213 -
Flags: review?(jaws)
Comment 18•11 years ago
|
||
Comment on attachment 762213 [details] [diff] [review]
Patch v1.4
Review of attachment 762213 [details] [diff] [review]:
-----------------------------------------------------------------
Yeah, this looks nice.
::: browser/components/customizableui/content/panelUI.js
@@ +200,5 @@
> tempPanel.openPopup(iconAnchor || aAnchor, "bottomcenter topright");
> }
> },
>
> + /**
nit, trailing whitespace
Attachment #762213 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 19•11 years ago
|
||
Whiteboard: [Australis:M7][User Research Build+] → [Australis:M7][User Research Build+][fixed-in-ux]
Comment 20•11 years ago
|
||
This seems to have broken sizing the menupanel to its contents. :-(
Comment 21•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #20)
> This seems to have broken sizing the menupanel to its contents. :-(
We should back this out until we have a fix for the menupanel sizing.
Assignee | ||
Comment 22•11 years ago
|
||
Yep, backed out as:
https://hg.mozilla.org/projects/ux/rev/0965605b441e
Whiteboard: [Australis:M7][User Research Build+][fixed-in-ux] → [Australis:M7][User Research Build+]
Assignee | ||
Comment 23•11 years ago
|
||
I think this bug was caused because we were trying to sync the panelview container heights too early, before the panel had even opened. We should only sync the container after ignoreMutations is set to false if the panel is open. If the panel is closed, the sync will happen automatically once the onpopupshowing event is fired.
Attachment #762213 -
Attachment is obsolete: true
Assignee | ||
Comment 24•11 years ago
|
||
Fixing some documentation. Going to re-land now.
Attachment #762718 -
Attachment is obsolete: true
Assignee | ||
Comment 25•11 years ago
|
||
Whiteboard: [Australis:M7][User Research Build+] → [Australis:M7][User Research Build+][fixed-in-ux]
Comment 26•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M7][User Research Build+][fixed-in-ux] → [Australis:M7][User Research Build+]
Target Milestone: --- → Firefox 28
You need to log in
before you can comment on or make changes to this bug.
Description
•