Commit Graph

51 Commits

Author SHA1 Message Date
Alexander Surkov
e5f57aa59a Bug 1525101 - Convert autocomplete-rich-result-popup into a Custom Element, r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D20506

--HG--
extra : moz-landing-system : lando
2019-03-05 17:45:57 +00:00
Gijs Kruitbosch
de6d0168b0 Bug 1532071 - call formatAccessKey when inheriting accesskey attributes into labels, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D22102

--HG--
extra : moz-landing-system : lando
2019-03-05 15:30:00 +00:00
Alexander Surkov
0d30de1b66 Bug 1455433 - migrate xul:checkbox to CE, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D21457

--HG--
rename : toolkit/content/widgets/checkbox.xml => toolkit/content/widgets/checkbox.js
extra : moz-landing-system : lando
2019-02-28 20:32:50 +00:00
Brian Grinstead
672f93b031 Bug 1528969 - Only remove whitespace-only text nodes in parseXULToFragment r=MattN
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
2019-02-19 23:28:30 +00:00
Brian Grinstead
033239db58 Bug 1527680 - Add MozElement inheritedAttributes helper for automatically inheriting attributes based on a map of selectors to attributes r=paolo
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
2019-02-15 23:10:18 +00:00
Daniel Varga
1e9aa9e1fc Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE
--HG--
rename : browser/components/nsBrowserContentHandler.js => browser/components/BrowserContentHandler.jsm
2019-02-15 03:51:05 +02:00
Brendan Dahl
74c580a4c5 Bug 1527733 - Remove special XUL DOM tree traversal. r=smaug
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
2019-02-14 10:43:35 +00:00
Alexander Surkov
1649231cef Bug 1527495 - migrate text-link binding to CE, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D19595

--HG--
rename : toolkit/content/widgets/text.xml => toolkit/content/widgets/text.js
2019-02-12 19:14:40 -05:00
Brian Grinstead
c894dd5369 Bug 1527105 - Convert menucaption to Custom Element r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D19439

--HG--
rename : toolkit/content/widgets/menu.xml => toolkit/content/widgets/menu.js
extra : moz-landing-system : lando
2019-02-12 19:08:25 +00:00
Brian Grinstead
9d224c7b43 Bug 1526826 - Make BaseTextMixin extend BaseControlMixin r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D19316

--HG--
extra : moz-landing-system : lando
2019-02-11 17:33:07 +00:00
Brian Grinstead
04c18529e4 Bug 1487065 - Implement popup-notification as a Custom Element r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D17699

--HG--
rename : toolkit/content/widgets/notification.xml => toolkit/content/widgets/popupnotification.js
extra : moz-landing-system : lando
2019-02-07 22:16:26 +00:00
Alexander Surkov
fccfd070c9 Bug 1519486 - convert autocomplete-richlistitem-insecure-field XBL binding to CE, r=bgrins 2019-01-24 08:40:22 -05:00
Myk Melez
25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Cosmin Sabou
599a15d354 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-29 12:01:56 +02:00
Brian Grinstead
5bea9f2e3e Bug 1523429 - Skip updating child attributes in MozElement.inheritAttribute if the host attribute hasn't changed r=timdream
Differential Revision: https://phabricator.services.mozilla.com/D17887

--HG--
extra : moz-landing-system : lando
2019-01-28 23:57:24 +00:00
Timothy Guan-tin Chien
0de6e5d4aa Bug 1518932 - Convert menulist to custom element r=paolo
This custom element replaces XBL <content> usage by directly prepend the two needed child nodes when the element is connected.

This is doable because

- There isn't any direct access of child nodes under <menulist>. Everyone seems to access via .menupopup, which is usually the only child.
- We don't need to move the children under <menulist>. If we need to and if the child is a <xbl:children> (which could happen if <menulist> is inside an XBL <content> that just get cloned to the document), the layout will get very confused and crash (see finding in bug 1514926)

Differential Revision: https://phabricator.services.mozilla.com/D16149

--HG--
rename : toolkit/content/widgets/menulist.xml => toolkit/content/widgets/menulist.js
extra : moz-landing-system : lando
2019-01-28 18:24:08 +00:00
Timothy Guan-tin Chien
c5b97c4ccd Bug 1518932 - Create BaseControlMixin, allowing BaseControl to inherit other native XULElement classes r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D14925

--HG--
extra : moz-landing-system : lando
2019-01-28 18:24:06 +00:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Brian Grinstead
f6c12a437b Bug 1441935 - Modifications on top of the generated MozBrowser Custom Element r=mconley
In order to make the history easier to navigate, this changeset includes the
modifications required to make <xul:browser> actually work as a Custom Element,
and switches the app to use it instead of the XBL browser.

Differential Revision: https://phabricator.services.mozilla.com/D14911

--HG--
extra : moz-landing-system : lando
2019-01-10 01:45:43 +00:00
Tim Nguyen
34cebfc0b6 Bug 1437641 - Remove numberbox binding and convert usages to input[type=number]. r=bgrins,dao
Differential Revision: https://phabricator.services.mozilla.com/D15882

--HG--
rename : toolkit/themes/shared/numberbox.css => toolkit/themes/shared/numberinput.css
extra : moz-landing-system : lando
2019-01-09 08:51:32 +00:00
Paolo Amadini
a61bfb98fb Bug 1472558 - Convert "richlistbox" to Custom Element. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D15502

--HG--
rename : toolkit/content/widgets/richlistbox.xml => toolkit/content/widgets/richlistbox.js
extra : rebase_source : 7517e9d0760589a3df426aef4fa1c9c33f5355aa
2018-12-31 07:54:10 +00:00
Neil Deakin
323ddeb5ad Bug 1492326, don't use 'instanceof nsiDOMXUL*' in toolkit and mobile files, r=paolo 2018-12-04 11:33:06 -05:00
Neil Deakin
2ceb209681 Bug 1492326, revert some of bug 1478372, so that callers need to get the custom interface from a custom element without using QueryInterface, r=peterv 2018-12-04 11:33:06 -05:00
Paolo Amadini
9004df8f9b Bug 1499947 - Part 2 - Remove the "progressmeter" element and related tests. r=bgrins,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12145

--HG--
extra : rebase_source : a322611933b371e726b25dd4223456a8f761e886
2018-11-20 14:12:33 +00:00
Paolo Amadini
cdb5b4eb19 Bug 1471403 - Part 4 - Convert "notificationbox" to a custom class. r=bgrins
As part of the conversion, support for notificationsHidden and children that are not notifications is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D10894

--HG--
rename : toolkit/content/widgets/notification.xml => toolkit/content/widgets/notificationbox.js
extra : rebase_source : 36a5412e1e9a9dc591fd486d1123c1f763a6f173
2018-11-09 14:58:18 +00:00
Paolo Amadini
f0c88ca5ba Bug 1471403 - Part 3 - Add a MozElements namespace for element classes. r=bgrins
This provides a way to access specific element classes before any associated Custom Element is instantiated, without creating a new global for each class. This can be useful to access static methods, create derived classes in a page, or allow lazy custom constructors.

Differential Revision: https://phabricator.services.mozilla.com/D10893

--HG--
extra : rebase_source : 65516d2013410146b4ed372a965bd859621b74a5
2018-11-05 13:56:01 +00:00
Victor Porof
24f2992ccd Bug 1499423 - Migrate the 3 treecol bindings into a Custom Element, r=bgrins 2018-11-01 16:03:14 +01:00
Alexander Surkov
93435b60f6 Bug 1502947 - Add helper function to MozXULElement for inheriting attributes;r=bgrins 2018-10-30 11:51:40 -07:00
Brian Grinstead
a8eabad78e Bug 1501845 - Load customElements.js inside migration.xul to fix migration UI when running with commandline;r=paolo
This is another case of a document getting loaded before MainProcessSingleton,
similar to profile manager. There's another wrinkle here, though. The migration
UI can also be loaded _after_ startup (through Bookmarks manager), which is
actually the primary way this UI is surfaced. So we need to also handle customElements.js
getting loaded twice into the same window to avoid attempting to redefine everything.

Differential Revision: https://phabricator.services.mozilla.com/D9713

--HG--
extra : moz-landing-system : lando
2018-10-26 17:22:15 +00:00
Brian Grinstead
5392b776a6 Bug 1499476 - Add the ability to mixin the base MozXULElement;r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D8898

--HG--
extra : moz-landing-system : lando
2018-10-16 19:59:16 +00:00
Brian Grinstead
4ee92c8669 Bug 1496425 - Provide a mechanism for Custom Elements to delay connectedCallback until after DOMContentLoaded;r=paolo
There are two reasons for this:
1) It's faster than running the connectedCallback in the middle of document parse, at least for
   <radiogroups> in about:preferences
2) It provides a construction sequence more similar to XBL, so the translation from XBL <constructor>
   to CE connectedCallback is more likely to be correct. This is because when there is markup like:
       <parent-ce><child-ce></child-ce></parent-ce>
   the parent-ce node is empty during the first connectedCallback. If we wait for DOMContentLoaded
   then the parent-ce has the child-ce node below it.

Differential Revision: https://phabricator.services.mozilla.com/D7944

--HG--
extra : moz-landing-system : lando
2018-10-08 21:17:39 +00:00
Alexander Surkov
ff145aa9c4 Bug 1491197 - replace progressmeter XBL binding by a custom element, r=paolo
--HG--
rename : toolkit/content/widgets/progressmeter.xml => toolkit/content/widgets/progressmeter.js
2018-10-03 11:13:05 +05:00
Brian Grinstead
27c32c10cf Bug 1481949 - Migrate <radiogroup> to a Custom Element;r=timdream
Differential Revision: https://phabricator.services.mozilla.com/D6326

--HG--
rename : toolkit/content/widgets/radio.xml => toolkit/content/widgets/radio.js
extra : moz-landing-system : lando
2018-10-01 18:01:02 +00:00
Brian Grinstead
574c7d7a6d Bug 1481949 - Don't load Custom Element script files for dummy.xul windows;r=kmag
They are unnecessary for most every element, and we load multiple dummy.xul
documents even in clean profiles.

Differential Revision: https://phabricator.services.mozilla.com/D7112

--HG--
extra : moz-landing-system : lando
2018-10-01 18:01:00 +00:00
Brian Grinstead
eaaac5ca03 Bug 1460982 - Convert <searchbar> to a Custom Element;r=adw
Differential Revision: https://phabricator.services.mozilla.com/D5912

--HG--
rename : browser/components/search/content/search.xml => browser/components/search/content/searchbar.js
extra : moz-landing-system : lando
2018-09-27 23:09:55 +00:00
Neil Deakin
eebb81f02b Bug 1478372, remove unneeded QueryInterface implementation for custom XUL elements as this is now done by nsXULElement::QueryInterface, r=bgrins 2018-09-19 06:46:55 -04:00
Brian Grinstead
2ebe13510b Bug 1492247 - Allow for null document.head in browser.xhtml inserting localization links;r=zbraniecki
This prevents an exception in browser.xhtml when there's no head, since
it's currently sharing the markup with browser.xul.

Differential Revision: https://phabricator.services.mozilla.com/D6194

--HG--
extra : moz-landing-system : lando
2018-09-18 21:45:51 +00:00
Brian Grinstead
a2db8cd913 Bug 1411707 - Switch findbar and findbar-textbox from XBL bindings into a Custom Element;r=paolo
MozReview-Commit-ID: F95i9H9FvYv

Differential Revision: https://phabricator.services.mozilla.com/D5596

--HG--
rename : toolkit/content/widgets/findbar.xml => toolkit/content/widgets/findbar.js
extra : moz-landing-system : lando
2018-09-14 18:30:31 +00:00
Brian Grinstead
aaf1aea124 Bug 1490457 - Add test for dynamically inserted localization links after parse;r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D5781

--HG--
extra : moz-landing-system : lando
2018-09-14 00:31:36 +00:00
Mark Banner
691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Brian Grinstead
ecede4d0e5 Bug 1469902 - Migrate <tabbox> to a Custom Element;r=dao
MozReview-Commit-ID: HNDiMYmKgkg

Differential Revision: https://phabricator.services.mozilla.com/D3989

--HG--
rename : toolkit/content/widgets/tabbox.xml => toolkit/content/widgets/tabbox.js
extra : moz-landing-system : lando
2018-08-28 16:07:28 +00:00
ExE Boss
8330d51c91 Bug 1473130 - Change parseXULToFragment to take an array of URLs for entities r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D4024

--HG--
extra : moz-landing-system : lando
2018-08-27 09:40:40 +00:00
Brian Grinstead
076839e8b4 Bug 1478139 - Migrate <editor> to a Custom Element. r=paolo
MozReview-Commit-ID: IiTzndil1MV

--HG--
rename : toolkit/content/widgets/editor.xml => toolkit/content/widgets/editor.js
extra : rebase_source : 137d6d8d1eac724f79ce58043fcc7b9d8c29f160
2018-08-06 14:22:02 +01:00
Brian Grinstead
b0b2b901d0 Bug 1470910 - Migrate input-box and input-box-spell to a Custom Element;r=paolo
Instead of `<xul:hbox class="textbox-input-box">`, consumers now should use
`<xul:moz-input-box />`. This covers the normal case and also handles
[spellcheck=true] while sharing much of the code within one class.

MozReview-Commit-ID: DjvT8sFq3SQ

--HG--
rename : toolkit/content/widgets/textbox.xml => toolkit/content/widgets/textbox.js
2018-08-02 20:53:59 -07:00
Neil Deakin
c68cebacd6 Bug 1461742, shared method to indicate that a custom element implements one or more interfaces, r=bgrins 2018-07-19 08:38:51 -04:00
Csoregi Natalia
143b18ba60 Backed out 2 changesets (bug 1461742) for build bustage on CustomElementRegistry.cpp:97. CLOSED TREE
Backed out changeset ca5415dbc51a (bug 1461742)
Backed out changeset 30bd77de7bf5 (bug 1461742)
2018-07-19 13:36:31 +03:00
Neil Deakin
422f787d47 Bug 1461742, shared method to indicate that a custom element implements one or more interfaces, r=bgrins 2018-07-19 06:15:29 -04:00
Brian Grinstead
a51862c3ca Bug 1450813 - Create print preview toolbar as customized built-in Custom Element;r=mconley,timdream
MozReview-Commit-ID: LYlQ8xxJNA8

--HG--
rename : toolkit/components/printing/content/printPreviewBindings.xml => toolkit/components/printing/content/printPreviewToolbar.js
extra : rebase_source : 1a08be09cafd2f8f88151edf3be9ce87ee957e35
2018-07-02 13:33:09 -07:00
Ciure Andrei
28ec424f82 Backed out 1 changesets (bug 1450813) for failing browser_page_change_print_original.js CLOSED TREE
Backed out changeset ee4e2bfffe18 (bug 1450813)

--HG--
rename : toolkit/components/printing/content/printPreviewToolbar.js => toolkit/components/printing/content/printPreviewBindings.xml
2018-07-02 22:38:18 +03:00
Brian Grinstead
5a994e7f37 Bug 1450813 - Create print preview toolbar as customized built-in Custom Element;r=mconley,timdream
MozReview-Commit-ID: Ermed741SRs

--HG--
rename : toolkit/components/printing/content/printPreviewBindings.xml => toolkit/components/printing/content/printPreviewToolbar.js
extra : rebase_source : d0a4eb903de05103aeeed9810429f69088efa57f
2018-07-02 10:28:29 -07:00