Граф коммитов

144 Коммитов

Автор SHA1 Сообщение Дата
Brad Werth 59271a70be Bug 1391994 Part 1: Add new methods to Element to set attributes via devtools. r=bzbarsky
This expands Element with chrome-only setAttribute methods that give devtools
callers an ExtendedPrincipal with a CSP with a flag set to allow changes to
inline styles. This gives devtools the ability to modify documents with a
Content-Security-Policy.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 01:45:51 +00:00
Emilio Cobos Álvarez e7e8c1f792 Bug 1559077 - Implement Element.part. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D48707

--HG--
extra : moz-landing-system : lando
2019-10-13 09:40:08 +00:00
Boris Zbarsky e5497b955e Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
For review purposes, the important changes are in dom/bindings/Configuration.py
and dom/bindings/parser.

The changes to the IDL files were done by running these in dom/webidl
and dom/bindings/test:

  perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl

And running this in dom/chrome-webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl

and then fixing all the resulting parser failures.  I then verified that the
generated code is the same as before this change.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 15:26:14 +00:00
Boris Zbarsky e52521c921 Bug 1574195 part 4. Switch remaining users of IDL "implements" over to mixin syntax. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D46523

--HG--
extra : moz-landing-system : lando
2019-09-24 15:22:26 +00:00
Frederic Wang 63f73c09e6 Bug 1579457 - Introduce GlobalEventHandlers/DocumentAndElementEventHandlers/ElementCSSInlineStyle mixin. r=bzbarsky
This patch converts NoInterfaceObject interfaces GlobalEventHandlers and
DocumentAndElementEventHandlers to mixins and introduce a new
ElementCSSInlineStyle mixin for the style IDL attribute. These are shared by
various existing interfaces but there is no web-exposed behavior change.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 19:34:55 +00:00
Frederic Wang 00ac838800 Bug 1577660 - Rename `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement`. r=bzbarsky
This commit renames `HTMLOrSVGOrXULElementMixin` to `HTMLOrForeignElement` and
actually makes it a mixin. dataset, tabIndex and blur() are moved from
HTMLElement, SVGElement and XULElement into this new mixin. As a consequence,
a few extended attributes for these interfaces are modified and the dataset
attribute is added to the XULElement one. However, none of these changes are
web-observable.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 07:46:46 +00:00
Boris Zbarsky 19251f27ce Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 07:52:35 +00:00
Cosmin Sabou 3ef8d24958 Backed out changeset 8e16f13a88c8 (bug 1562680) for colliding with Bug 1366738 that was backed out. CLOSED TREE 2019-07-03 10:46:39 +03:00
Boris Zbarsky 73f095abc4 Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:44:36 +00:00
Mihai Alexandru Michis c7fc76c18f Backed out changeset 12653dd76667 (bug 1562680) for causing bustages in FuzzingFunctions.webidl CLOSED TREE 2019-07-03 09:34:48 +03:00
Boris Zbarsky 3a5c721abb Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:15:54 +00:00
Jonathan Watt c327ad117f Bug 1559840. Add a pref to expose the transform getters on the Element interface. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D35208

--HG--
extra : rebase_source : 2910236db53d098fe725a3f8911668432cf02610
2019-06-17 15:51:33 -07:00
alwu 119f85db3a Bug 1536762 - part2 : use first line box's size as positioning basic unit. r=heycam,baku
According to the spec [1] 7.2.10.2, we should use the first line box's height or width as positioning unit to adjust box's position.

We will also use this value to adjust box when `snap-to-line` is false.

There, we implement a new chrome-only API to acquire this information, which would return the first line box's size in the `block` frame.

[1] https://www.w3.org/TR/webvtt1/#ref-for-webvtt-cue-snap-to-lines-flag-12

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

--HG--
extra : moz-landing-system : lando
2019-05-09 19:22:33 +00:00
alwu 9ea9ba3929 Bug 1536762 - part1 : use unscaled bounding box'size as a cue box's size. r=baku,heycam
When adjusting cue's position, the goal is to place cue boxes fully inside the rendering area, and place in the right place.

In order to check whether the box is correctly inside the rendering area, we have to know the correct size of the cue box.

Therefore, we implement the new chrome-only APIs to acquire this information (box's height and width), and this returned value won't be affected by CSS transformation, which is good for positioning.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 18:26:17 +00:00
Mirko Brodesser ed491dbad1 Bug 1374045: add 'preventScroll' option to HTMLElement's, SVGElement's and XULElement's 'focus' method r=smaug
- Remove expectation that 'preventScroll.html' fails.

- Use '[NoInterfaceObject] interface' workaround to simulate missing 'mixin' support.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 08:16:47 +00:00
Manish Goregaokar 8d9735ff94 Bug 1359269 - Part 10: Make it a hard error to apply TreatNullAs on non-types; r=bzbarsky
Depends on D20060

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

--HG--
extra : moz-landing-system : lando
2019-03-02 04:22:05 +00:00
Dorel Luca d66ca2b25b Backed out 11 changesets (bug 1359269) for Linting failure. CLOSED TREE
Backed out changeset 00461a29f650 (bug 1359269)
Backed out changeset 6c09eccc4bd1 (bug 1359269)
Backed out changeset ae30401e7988 (bug 1359269)
Backed out changeset 8f9509e82439 (bug 1359269)
Backed out changeset bfb153c7f9c3 (bug 1359269)
Backed out changeset 1430913c5e9e (bug 1359269)
Backed out changeset 4bb00dc53459 (bug 1359269)
Backed out changeset 7705b1ebb154 (bug 1359269)
Backed out changeset 7fd8a3c1f827 (bug 1359269)
Backed out changeset c3f37539cb31 (bug 1359269)
Backed out changeset bb694b612b1b (bug 1359269)
2019-03-02 04:07:00 +02:00
Manish Goregaokar e8ca5270f2 Bug 1359269 - Part 10: Make it a hard error to apply TreatNullAs on non-types; r=bzbarsky
Depends on D20060

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

--HG--
extra : moz-landing-system : lando
2019-03-02 01:23:32 +00:00
Hiroyuki Ikezoe 7f39371579 Bug 1526749 - Drop Element.scrollByNoFlush. r=kats,mccr8
It's no longer used since bug 970125.

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

--HG--
extra : moz-landing-system : lando
2019-02-11 23:44:51 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Edgar Chen 686575bf11 Bug 1509795 - Add UseCounter telemetry for Shadow DOM API; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13250

--HG--
extra : moz-landing-system : lando
2018-11-28 15:11:38 +00:00
Timothy Guan-tin Chien 2b5881e46b Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 06:51:07 +00:00
Andreea Pavel d51566f085 Backed out 2 changesets (bug 1503019) for failing crashtests at dom/base/crashtests/1505811.html on a CLOSED TREE
Backed out changeset 06b12fd41ff1 (bug 1503019)
Backed out changeset 7b845eac9dd7 (bug 1503019)
2018-11-15 01:52:30 +02:00
Timothy Guan-tin Chien c0cc4f74e7 Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 19:34:52 +00:00
Andrea Marchesini f30a0f8e42 Bug 1504946 - Deprecate moz-prefixed fullscreen API, r=smaug 2018-11-06 13:36:13 +01:00
Xidorn Quan 8327aa1e34 Bug 1188256 part 7 - Have Element.requestFullscreen return a Promise. r=smaug
Depends on D5858

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

--HG--
extra : moz-landing-system : lando
2018-09-14 22:44:21 +00:00
Xidorn Quan abdaa90858 Bug 1375319 part 3 - Try dispatching fullscreen events to element first rather than document. r=smaug
Some steps in file_fullscreen-api.html are adjusted in order to test
the behavior that the event is correctly dispatched to the document
when element is disconnected.

Depends on D5415

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

--HG--
extra : moz-landing-system : lando
2018-09-14 00:06:16 +00:00
Cosmin Sabou 679b5e2db1 Backed out 5 changesets (bug 1485040) for causing build bustages on test_mozwebidlcodegen. CLOSED TREE
Backed out changeset b417c2d937e8 (bug 1485040)
Backed out changeset c567c4c7438f (bug 1485040)
Backed out changeset 806c36cb2c4c (bug 1485040)
Backed out changeset 0fbb490ffc7f (bug 1485040)
Backed out changeset a9622e7761eb (bug 1485040)
2018-09-13 23:04:55 +03:00
Andrew McCreight 93b3b0138c Bug 1485040, part 5 - Automatically fix mode lines in WebIDL files r=qdot
This patch was generated by my modeline.py script.

MozReview-Commit-ID: EbVjPLwiUAT

Depends on D4159

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

--HG--
extra : moz-landing-system : lando
2018-09-13 19:30:51 +00:00
Xidorn Quan 63a8649721 Bug 1486297 - Add a pref for Pointer Lock API so that user can disable it. r=smaug!
Differential Revision: https://phabricator.services.mozilla.com/D4637

--HG--
extra : moz-landing-system : lando
2018-08-30 22:55:31 +00:00
Brad Werth 949df1e3d9 Bug 1479508 Part 1: Move devtools-specific function definitions in Element.webidl into a better-documented partial interface. r=bz
MozReview-Commit-ID: 6227lasylzN

--HG--
extra : rebase_source : f9cf8938d4cd01ceebc1adc2ffd078a98d928fae
2018-08-01 11:52:21 -07:00
Coroiu Cristina 3a66c3c087 Backed out 3 changesets (bug 1479508) for devtools failures at devtools/client/inspector/grids/test/browser_grids_no_fragments.js on a CLOSED TREE
Backed out changeset cba3360692b8 (bug 1479508)
Backed out changeset c42fa0ccd335 (bug 1479508)
Backed out changeset 09d7d2f8fe4f (bug 1479508)
2018-08-04 00:48:56 +03:00
Brad Werth 1fd862a606 Bug 1479508 Part 1: Move devtools-specific function definitions in Element.webidl into a better-documented partial interface. r=bz
MozReview-Commit-ID: 6227lasylzN

--HG--
extra : rebase_source : f9cf8938d4cd01ceebc1adc2ffd078a98d928fae
2018-08-01 11:52:21 -07:00
Olli Pettay de99e4460b Bug 1439153 - Make WebExtensions work with Shadow DOM/WebComponents, r=kmag
--HG--
extra : rebase_source : 83638cba42eea1523d32d06a2eb14df20cbab404
2018-07-14 05:26:15 +03:00
Olli Pettay 6f378a4ffa Bug 1475485, @title tooltips should work also inside ShadowDOM, r=mrbkap 2018-07-14 04:48:19 +03:00
Jonathan Kingston 59b20406b3 Bug 1469592 - Add support for Element.toggleAttribute. r=bzbarsky,smaug!
MozReview-Commit-ID: KkDLMlQgESs

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

--HG--
extra : moz-landing-system : lando
2018-07-03 19:12:49 +00:00
Johann Hofmann ded334a8cb Bug 1444394 - Remove Element::UnsafeSetInnerHTML. r=bz,kmag
The last remaining user is already turned off and being removed
in bug 1444395 so that we can finally remove this unsafe code and
sleep a little better knowing that XSS through markup injections
will be impossible in chrome contexts.

MozReview-Commit-ID: KcZq8fRPiD4

--HG--
extra : rebase_source : 5def3abb50ed8f1b43e17072088e38a44394488b
2018-05-28 22:55:52 +02:00
Emilio Cobos Álvarez 9509cd7e32 Bug 1453789: Remove Element.createShadowRoot. r=smaug
MozReview-Commit-ID: Hgxbp1Icgvh
2018-04-13 20:51:55 +02:00
Boris Zbarsky 17509bc9da Bug 1449019. Actually propagate out exceptions from the innerHTML getter. r=smaug
I moved the IgnoreErrors decl so it would come after the OOMReporter decl and I
could add the new conversion operator.

MozReview-Commit-ID: B1S6DXmZfvE
2018-03-26 16:41:43 -04:00
Boris Zbarsky 98a683f9e1 Backed out changeset 1023e033bfa6 (bug 1132934) because it hasn't been reviewed yet.
MozReview-Commit-ID: LXefIp2OG6Q
2018-03-26 16:47:31 -04:00
Boris Zbarsky 0ce4de30db Bug 1132934 part 1. Actually propagate out exceptions from the innerHTML getter. r=smaug
MozReview-Commit-ID: KEqsx836qQn
2018-03-26 16:41:43 -04:00
Olli Pettay b0ee39f2c7 Bug 1421568 - Add a ChromeOnly method to access also closed shadow roots, r=mrbkap
--HG--
extra : rebase_source : 4c596aa8938c2c325a9f6f4448050df5f8f6c9a0
2018-02-03 12:15:25 +02:00
Kris Maglione b3cac601f6 Bug 1432966: Sanitize HTML fragments created for chrome-privileged documents. r=bz f=gijs
This is a short-term solution to our inability to apply CSP to
chrome-privileged documents.

Ideally, we should be preventing all inline script execution in
chrome-privileged documents, since the reprecussions of XSS in chrome
documents are much worse than in content documents. Unfortunately, that's not
possible in the near term because a) we don't support CSP in system principal
documents at all, and b) we rely heavily on inline JS in our static XUL.

This stop-gap solution at least prevents some of the most common vectors of
XSS attack, by automatically sanitizing any HTML fragment created for a
chrome-privileged document.

MozReview-Commit-ID: 5w17celRFr

--HG--
extra : rebase_source : 1c0a1448a06d5b65e548d9f5362d06cc6d865dbe
extra : amend_source : 7184593019f238b86fd1e261941d8e8286fa4006
2018-01-24 14:56:48 -08:00
Jessica Jong 4bee56a645 Bug 1428685 - Use dom.webcomponents.shadowdom.enabled pref for Shadow DOM. r=smaug
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"

MozReview-Commit-ID: er1c7AsSSW
2018-01-16 17:16:30 +01:00
Nika Layzell a0d1f16079 Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug
MozReview-Commit-ID: 2aHA6NcQPGk
2018-01-12 17:52:52 -05:00
Boris Zbarsky 04324f18ad Bug 1424474 part 3. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag
MozReview-Commit-ID: IjUEG5xwn5
2017-12-20 17:43:18 -05:00
Emilio Cobos Álvarez 87520df9da Bug 1426503: Remove DestInsertionPoints stuff. r=smaug
MozReview-Commit-ID: KtaEqZn9GH3

--HG--
extra : rebase_source : 54b76e2437cd3031d12973b7021ba740474f07e3
2017-12-20 22:08:15 +01:00
Jessica Jong 7fe15d1a52 Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a testcase
ends, but nsDocument::DeleteShell is called afterwards. So, we make the
preference per-doc and set it when the document is created. The value does not
change for the lifetime of the document.
2017-12-09 11:25:14 +08:00
Brad Werth 2b55f1e881 Bug 1409083 Part 2: Stub webidl definitions to support flex container/item properties. r=smaug
MozReview-Commit-ID: KwNykBkJfPi

--HG--
extra : rebase_source : 6b858035d6d2850afbe310658a65a6f7dd2baa8f
2017-11-15 13:20:35 -08:00