Commit Graph

101 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
6869665d58 Bug 1627520 - Use keydown instead of keypress for autocomplete event listeners. r=mak,Gijs
This is so that we can avoid needing mozSystemGroup (to get keypress for
non-printable keys), which in turn prevents racing with the native key event
listeners, see the second patch in bug 1624657.

This turned out to be a bit tricky, because we need to guarantee the ordering of
the search one-offs handling in the searchbar with the usual autocomplete-input
handling. We could try to move this to the popup subclass but this is already a
bigger patch than what I'd like.

We can also revert the customElements.js change I did in bug 1624657, as the bug
is no longer relevant.

Differential Revision: https://phabricator.services.mozilla.com/D69743
2020-04-14 20:48:26 +00:00
Bogdan Tara
8df8611a4f Backed out changeset b92904ec121f (bug 1627520) for browser_searchbar_keyboard_navigation.js failures CLOSED TREE 2020-04-14 16:58:35 +03:00
Emilio Cobos Álvarez
773cbf50dc Bug 1627520 - Use keydown instead of keypress for autocomplete event listeners. r=mak,Gijs
This is so that we can avoid needing mozSystemGroup (to get keypress for
non-printable keys), which in turn prevents racing with the native key event
listeners, see the second patch in bug 1624657.

This turned out to be a bit tricky, because we need to guarantee the ordering of
the search one-offs handling in the searchbar with the usual autocomplete-input
handling. We could try to move this to the popup subclass but this is already a
bigger patch than what I'd like.

We can also revert the customElements.js change I did in bug 1624657, as the bug
is no longer relevant.

Differential Revision: https://phabricator.services.mozilla.com/D69743
2020-04-14 12:42:16 +00:00
Emma Malysz
e4397c159d Bug 1590573, create a unified approach for caching fragments in our Custom Elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58866
2020-04-08 16:17:50 +00:00
Razvan Maries
155eb99120 Backed out changeset 6b7c81561ecc (bug 1590573) for marionette perma failures on test_refresh_firefox.py. CLOSED TREE 2020-04-08 07:43:49 +03:00
Emma Malysz
5944c8268e Bug 1590573, create a unified approach for caching fragments in our Custom Elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58866
2020-04-07 23:56:45 +00:00
Emilio Cobos Álvarez
8dd7869f2e Bug 1624657 - Eagerly load autocomplete-input custom element. r=Gijs
My patch causes an interesting regression. We stop constructing custom elements
for the stuff inside the edit-bookmark-panel as expected. This means that the
autocomplete-input here:

  https://searchfox.org/mozilla-central/rev/3f9e822318e8ec18ce673a9cb983d3608a3e2ed2/browser/components/places/content/editBookmarkPanel.inc.xhtml#81

Doesn't cause autocomplete-input.js to load. That means that it'll load by the
time the searchbar-textbox autocomplete is created, which means that it'll get
upgraded asynchronously. So far so good. However there's an interesting race due
to the way keypress event listeners are setup in autocomplete-input.js. In
particular, it uses the capture phase and the system group:

  https://searchfox.org/mozilla-central/rev/3f9e822318e8ec18ce673a9cb983d3608a3e2ed2/toolkit/content/widgets/autocomplete-input.js#38

This means it'll race with the other native / system group event listeners that
get added by the editor component. This caused arrow-up / arrow-down to not work
on the searchbar because the custom element was upgraded async.

This kinda papers over the issue the same way editBookmarkPanel was papering
over it, but ideally we should figure out a way to not use the system group or
keypress there so that we don't race in this awful way. Separate bug, probably.

Differential Revision: https://phabricator.services.mozilla.com/D69730
2020-04-05 18:36:00 +00:00
Tim Nguyen
4e7d6e9096 Bug 1625982 - Rename textbox.js and textbox.css to moz-input-box.js and search-textbox.css. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D68829
2020-03-30 18:22:56 +00:00
Mark Banner
1cc76add79 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509
2020-03-08 21:45:16 +00:00
Brendan Dahl
ceaa1a0f8e Bug 1531455 - Don't load extra custom elements in GeckoView. r=bgrins
GeckoView only needs the browser element, skip loading the rest.

Differential Revision: https://phabricator.services.mozilla.com/D63360
2020-02-19 20:13:42 +00:00
Emma Malysz
ba6b2f0a9b Bug 1601093, Rename the remaining .xul files to .xhtml in toolkit/ r=marionette-reviewers,mossop,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55857
2019-12-11 17:44:54 +00:00
Gurzau Raul
c2d189a7a6 Backed out changeset dd809e835f2a (bug 1601093) for eslint failures at alert.xhtml and commonDialog.xhtml on a CLOSED TREE. 2019-12-11 19:27:28 +02:00
Emma Malysz
abfeb3aaa3 Bug 1601093, Rename the remaining .xul files to .xhtml in toolkit/ r=marionette-reviewers,mossop,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D55857
2019-12-11 17:02:20 +00:00
Emma Malysz
32233a0ca1 Bug 1592141, look for xul ns root element within customElement.js r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D52291
2019-11-11 19:20:28 +00:00
Alexander J. Vincent
e2ffa53f7c Bug 1591761 - parseXULToFragment should throw a clearer exception for non-well-formed markup. r=bgrins
***
Bug 1591671, revert a breaking change in calling DOMParser.

Differential Revision: https://phabricator.services.mozilla.com/D50729
2019-10-29 23:04:14 +00:00
Oana Pop Rus
3383114e4b Backed out changeset 8799781bbf34 (bug 1591761) for causing mass test failures. on a CLOSED TREE 2019-10-29 01:19:11 +02:00
Alexander J. Vincent
cced0cd2d1 Bug 1591761 - parseXULToFragment should throw a clearer exception for non-well-formed markup. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D50729
2019-10-28 21:59:59 +00:00
Alexander Surkov
19eabb6750 Bug 1397876 - Replace panel and arrowpanel bindings with a custom element r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D35040
2019-10-07 21:57:04 +00:00
Brian Grinstead
1ce836b612 Bug 1514926 - Convert the arrowscrollbox binding to a Custom Element r=dao
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
2019-10-03 04:21:15 +00:00
Dorel Luca
8ed3a683b3 Backed out changeset 5e221240fc1d (bug 1514926) for mochitest failures in browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js 2019-10-03 06:08:18 +03:00
Brian Grinstead
cf8e189da8 Bug 1514926 - Convert the arrowscrollbox binding to a Custom Element r=dao
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
2019-10-02 22:57:39 +00:00
Sean Feng
dcfd220746 Bug 1467970 - Unsupport cross docGroup adoption r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D43135
2019-09-14 00:09:44 +00:00
Tim Nguyen
2be30c16a5 Bug 1534455 - Convert autocomplete binding to a customized input element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D33250
2019-09-17 06:22:42 +00:00
Mihai Alexandru Michis
7aa1fc73e6 Backed out changeset e859a5aebb5b (bug 1534455) for causing failures at test_bug437844.xul 2019-09-17 07:51:36 +03:00
Tim Nguyen
7d98f6a96f Bug 1534455 - Convert autocomplete binding to a customized input element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D33250
2019-09-17 01:35:25 +00:00
Paul Morris
4e8536c32e Bug 1545824 - Implement a getElementForAttrInheritance function r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D39210
2019-07-30 15:11:26 +00:00
Victor Porof
3ca308bcdc Bug 1561435 - Format toolkit/content/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36053
2019-07-05 11:14:49 +02:00
Alexander Surkov
1160845e4e Bug 1544916 - migrate dialog binding to Custom Element r=bgrins,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D30289
2019-06-04 17:28:16 +00:00
Andrew Swan
1ab513d145 Bug 1519577 Convert toolbarbutton to a custom element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D31941
2019-05-20 10:01:02 -07:00
Tim Nguyen
8febf82700 Bug 1521280 - Convert search-textbox to a custom element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D23045
2019-05-13 18:12:37 +00:00
Coroiu Cristina
bf0ad6faca Backed out changeset c5798de806e2 (bug 1521280) for crashing when searching about:config for upcoming beta (bug 1551013) 2019-05-13 08:50:28 +03:00
Tim Nguyen
606d5c9ce4 Bug 1521280 - Convert search-textbox to a custom element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D23045
2019-05-10 11:46:49 +00:00
Razvan Maries
cbf14f8671 Merge mozilla-inbound to mozilla-central a=merge 2019-04-26 12:46:15 +03:00
Brian Grinstead
7d71257436 Bug 1448213 - Migrate label-control to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D5686
2019-04-23 20:16:46 +00:00
Andrew Swan
a21c1c9924 Bug 1538983 Convert button xbl binding to a custom element r=bgrins
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
2019-04-15 14:27:32 -07:00
Brian Grinstead
dbf5dbdc86 Bug 1546024 - Clear the _inheritedElements cache on chrome custom elements when re-calling initializeAttributeInheritance r=surkov
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
2019-04-22 13:52:17 +00:00
Andrew Swan
73ea1505a3 Bug 1545865 Handle inherited attributes overridden by derived element classes r=bgrins
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
2019-04-20 16:22:10 +00:00
Brian Grinstead
4348b835fc Bug 1545765 - Fix attribute inheritance for empty attribute values r=aswan
This accidentally got dropped in Bug 1528268.

Differential Revision: https://phabricator.services.mozilla.com/D28251
2019-04-19 21:07:40 +00:00
Brian Grinstead
ba6c105dbc Bug 1519502 - Convert menu bindings to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D19593
2019-04-18 16:41:46 +00:00
Brian Grinstead
fac4c41f94 Bug 1528268 - Make initializeAttributeInheritance and incremental attribute changes do less work r=aswan
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
2019-04-18 16:41:39 +00:00
Dorel Luca
cbbe0cd921 Backed out 2 changesets (bug 1519502, bug 1528268) for Crashtest failures in toolkit/content/tests/chrome/test_popupincontent.xul. CLOSED TREE
Backed out changeset 904cc7903feb (bug 1519502)
Backed out changeset f8770d7eebd1 (bug 1528268)
2019-04-18 18:26:41 +03:00
Brian Grinstead
73a601351c Bug 1519502 - Convert menu bindings to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D19593
2019-04-17 15:56:41 +00:00
Brian Grinstead
251289c95b Bug 1528268 - Make initializeAttributeInheritance and incremental attribute changes do less work r=aswan
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
2019-04-17 18:48:46 +00:00
Brian Grinstead
953ffa1614 Bug 1544924 - Support filtering individual classes with MOZ_INSTRUMENT_CUSTOM_ELEMENTS;r=aswan
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
2019-04-17 01:12:41 +00:00
Brian Grinstead
336ddd77ec Bug 1541516 - Instrument base custom element class and print call information in the console r=aswan
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
2019-04-10 17:34:43 +00:00
Alexander Surkov
db46369850 Bug 1542844 - All wizards displays [Done] button from the point where they open on OS X, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D26734
2019-04-09 21:16:07 +00:00
Paul Morris
17e2392eaa Bug 1531870 - [de-xbl] convert popup binding to custom element; r=bgrins
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
2019-03-30 00:05:08 +00:00
Andrew Swan
b8ac7ba04c Bug 1535182 Remove BaseElementMixin and MozElementMixin from window global r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D24828
2019-03-26 21:43:13 +00:00
Alexander Surkov
2f610cf2fa Bug 1534685 - make all custom elements to use the attribute inheritance base implementation, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D23541
2019-03-14 21:44:54 +00:00
Alexander Surkov
df3e06b6c7 Bug 1495622 - Conver wizardpage binding to Custom Elements, r=paolo 2019-03-06 10:27:25 -05:00