Closed Bug 875138 Opened 8 years ago Closed 8 years ago

Update devtools tab to be compatible with XBL refactoring changes.


(DevTools :: General, defect)

Not set


(Not tracked)

Firefox 25


(Reporter: wchen, Assigned: wchen)




(1 file, 1 obsolete file)

There is a big XBL refactoring effort (bug 653881) that causes some changes in behavior. The change that affects this bug occurs when children of a bound element do not match any <children> insertion points in the binding's <content>. The current behavior is that we ignore the anonymous content and use the children of the bound element, the new behavior is to always use the anonymous content. See bug 872317 for more explaination.

The devtools tabs are radio buttons bound to the radio binding. The radio binding has anonymous content but no insertion points. We append some children into the radio buttons and the children do not match any insertion points, this causes the binding to ignore the anonymous content, but soon we will always use the anonymous content and the appended children will not be visible.
This patch changes the binding on the devtools tab from radio to control-item (which has no anonymous content and will always render the children of the radio element in both the current world and the post-XBL refactoring world). Another motivation for the change is that we are not using the radio element appropriately, it should be in a radiogroup or it will lead to javascript errors (JavaScript error: chrome://global/content/bindings/radio.xml, line 528: this.control is null). Changing the binding fixes this problem as well. Is there a reason why we are using a radio button in the first place?
Attachment #753025 - Flags: review?(jwalker)
Comment on attachment 753025 [details] [diff] [review]
Update devtools tab to be compatible with XBL refactoring changes.

Review of attachment 753025 [details] [diff] [review]:

Sorry for the delay.
Attachment #753025 - Flags: review?(jwalker) → review+
Blocks: 653881
There was a test failure with my earlier patch, could you please review the changes made to browser/devtools/framework/test/browser_new_activation_workflow.js

By removing the radio button binding, the tab lost the .selected property that doesn't look like it's being used anywhere else except for the test.
Attachment #753025 - Attachment is obsolete: true
Attachment #768108 - Flags: review?(jwalker)
Attachment #768108 - Flags: review?(jwalker) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.