This uses Shadow DOM slotting instead of XBL, and migrates styles from
using XBL anonymous traversal to using CSS Shadow Parts.
This also removes the basecontrol binding, since this was the last
binding to extend it.
Differential Revision: https://phabricator.services.mozilla.com/D43651
--HG--
rename : toolkit/content/widgets/scrollbox.xml => toolkit/content/widgets/arrowscrollbox.js
extra : moz-landing-system : lando
This uses Shadow DOM slotting instead of XBL, and migrates styles from
using XBL anonymous traversal to using CSS Shadow Parts.
This also removes the basecontrol binding, since this was the last
binding to extend it.
Differential Revision: https://phabricator.services.mozilla.com/D43651
--HG--
rename : toolkit/content/widgets/scrollbox.xml => toolkit/content/widgets/arrowscrollbox.js
extra : moz-landing-system : lando
As of this change, instances of xul <button> use a custom element.
The button-base xbl binding remains for now, since it is still used
by toolbarbutton, it will be removed soon.
Differential Revision: https://phabricator.services.mozilla.com/D27742
--HG--
rename : toolkit/content/widgets/button.xml => toolkit/content/widgets/button.js
extra : rebase_source : 2be8ee3fa9bb43866013f62211d8cb3706dbf1ab
Otherwise we can end up setting the proper attribute on removed children when elements get disconnected
and reconnected.
Differential Revision: https://phabricator.services.mozilla.com/D28306
--HG--
extra : moz-landing-system : lando
The existing implementation of inherited attributes keeps a data
structure in a property on the class, but derived classes were
unintentionally getting that structure from their parent class,
preventing derived classes from declaring a different set of inherited
attributes.
Differential Revision: https://phabricator.services.mozilla.com/D28255
--HG--
extra : moz-landing-system : lando
This provides a flipped data structure based on the provided inheritedAttributes,
which looks like:
Object<selector, attrs_to_inherit_comma_separated>
To one that looks like:
Object<attr, Array<Array<selector, attr_to_inherit>>
This should improve performance because:
1) We only fetch element at connectedCallback that actually will have attributes inherited.
2) When an attribute changes we can quickly inherit only that one.
Differential Revision: https://phabricator.services.mozilla.com/D27801
--HG--
extra : moz-landing-system : lando
This provides a flipped data structure based on the provided inheritedAttributes,
which looks like:
Object<selector, attrs_to_inherit_comma_separated>
To one that looks like:
Object<attr, Array<Array<selector, attr_to_inherit>>
This should improve performance because:
1) We only fetch element at connectedCallback that actually will have attributes inherited.
2) When an attribute changes we can quickly inherit only that one.
Differential Revision: https://phabricator.services.mozilla.com/D27801
--HG--
extra : moz-landing-system : lando
For example, you can do MOZ_INSTRUMENT_CUSTOM_ELEMENTS=MozXULElement,Button
to limit output to classes containing those strings in their name
Differential Revision: https://phabricator.services.mozilla.com/D27800
--HG--
extra : moz-landing-system : lando
If MOZ_INSTRUMENT_CUSTOM_ELEMENTS is set in the environment, then modify Custom Elements
to wrap each function and property lookup to keep a count and running time. Then print out
tables for each element at startup. Tables can be re-printed with `MozElements.printInstrumentation()`.
Differential Revision: https://phabricator.services.mozilla.com/D24953
--HG--
extra : moz-landing-system : lando
For now, only add the MozMenuPopup base class to MozElements,
and don't define a custom element for it with
`customElements.define`. This is to help avoid conflicts in
de-xbl work. (See the bug for details.)
Includes a function to do 'manual slotting', moving child
elements into place. Dynamically adding, modifying, or
removing child nodes after the element is connected needs
to be handled manually as well.
Differential Revision: https://phabricator.services.mozilla.com/D25467
--HG--
rename : toolkit/content/widgets/popup.xml => toolkit/content/widgets/menupopup.js
extra : moz-landing-system : lando
It was supposed to be doing this already, but we were instead removing _all_ text
nodes, which led the the "Learn More" link not showing up in popupnotifications
Differential Revision: https://phabricator.services.mozilla.com/D20379
--HG--
extra : moz-landing-system : lando
This allows elements to skip explicitly declaring `observedAttributes` and then imperatively
calling `inheritAttribute` on the appropriate child nodes. For simple cases this means less
boilerplate and moving this logic into the base class.
This is an opt-in feature, so more complex cases can continue to manually implement inheriting
behavior as before.
Differential Revision: https://phabricator.services.mozilla.com/D19702
--HG--
extra : moz-landing-system : lando
Move functionality out of XULDocument::AddElementToDocumentPost:
1) Convert all XUL link elements into HTML link elements which have
code to handle when they are added to the DOM.
2) Move handling of the end of a linkset element into nsXULElement's DoneAddingChildren callback.
3) Move document direction reset to where the root element is created.
Differential Revision: https://phabricator.services.mozilla.com/D19739
--HG--
extra : moz-landing-system : lando