Commit Graph

501 Commits

Author SHA1 Message Date
Cameron McCormack
198a280c43 Bug 1496308 - Require URLExtraData::mPrincipal to be non-null r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7682
2018-10-10 03:10:07 +00:00
Andrea Marchesini
95a7079459 Bug 1495362 - FeaturePolicy: fullscreen, r=smaug 2018-10-04 14:34:37 +02:00
Nicholas Nethercote
325d491a33 Bug 1451169 - Use nsStaticAtom* instead of nsStaticAtom** in Element.h. r=baku 2018-04-03 13:21:06 +10:00
Emilio Cobos Álvarez
850464117c Bug 1484285 - Avoid loading XBL bindings for stuff that is very likely to be a custom-element. r=smaug
This should be more generic than hardcoding the tags, and be enough for our
chrome to avoid regressions as they migrate more stuff to CE, avoiding calling
into the GetComputedStyle machinery..

Differential Revision: https://phabricator.services.mozilla.com/D6537
2018-09-21 21:29:25 +00:00
Brian Grinstead
38d8522e9f Bug 1465592 - Enable Shadow DOM unconditionally in chrome documents;r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D6278
2018-09-20 18:18:32 +00:00
Xidorn Quan
aea206e90b Bug 1491212 part 2 - Have a new FullscreenChange superclass split from FullscreenRequest. r=smaug
The next patch would create another subclass of FullscreenChange for
handling fullscreen exit.

Depends on D5988

Differential Revision: https://phabricator.services.mozilla.com/D5989
2018-09-17 23:20:28 +00:00
Xidorn Quan
5ce70d464b Bug 1188256 part 7 - Have Element.requestFullscreen return a Promise. r=smaug
Depends on D5858

Differential Revision: https://phabricator.services.mozilla.com/D5853
2018-09-14 22:44:21 +00:00
Xidorn Quan
51772fdef7 Bug 1188256 part 4 - Move fullscreenerror dispatching into FullscreenRequest. r=smaug
Depends on D5850

Differential Revision: https://phabricator.services.mozilla.com/D5851
2018-09-14 19:07:10 +00:00
Xidorn Quan
9a0301d1c6 Bug 1188256 part 2 - Make constructor of FullscreenRequest private and use create functions for building the object. r=smaug
This is done so that we can encapsulate more logic in this struct in following commits.

Depends on D5847

Differential Revision: https://phabricator.services.mozilla.com/D5848
2018-09-14 19:01:33 +00:00
Xidorn Quan
50bf5f4e3f Bug 1188256 part 1 - Move FullscreenRequest into a separate header and inline its methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5847
2018-09-14 18:57:08 +00:00
Xidorn Quan
20d6349049 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
2018-09-14 00:06:16 +00:00
Xidorn Quan
83013be914 Bug 1490539 part 3 - Put CallerType into FullscreenRequest. r=smaug
Depends on D5640

Differential Revision: https://phabricator.services.mozilla.com/D5641
2018-09-12 19:28:53 +00:00
Xidorn Quan
5fa29d57e1 Bug 1490539 part 1 - Change FullScreen to Fullscreen in various names. r=smaug
Some methods on Window are not changed because they are part of public
interface. Method names from widget are also unchanged.

Many "full-screen" in comments are also updated to "fullscreen" instead.

Differential Revision: https://phabricator.services.mozilla.com/D5639
2018-09-12 15:51:30 +00:00
Emilio Cobos Álvarez
dbef1026a1 Bug 1484478 - Use a node bit for connectedness. r=smaug
While trying to repro bug 1484293 I noticed that this assertion failed:

https://searchfox.org/mozilla-central/rev/ef8b3886cb173d5534b954b6fb7eb2d94a9473d0/dom/base/ShadowRoot.cpp#160

(during unlink, while unbinding the kids)

We rely on GetComposedDoc returning the right thing during unbind to cleanup
some stuff (see bug 1473637 for example), so it should probably be correct all
the time, regardless of whether something is unlinked or not.

Also this makes GetComposedDoc() much faster, which is nice too, since we call
it somewhat often.

I removed NodeHasRelevantHoverRules, since it's unused (was used by the old
style system).

I moved the SetIsConnected(false) call for the shadow root to before unbinding
the kids for consistency with what Element does with the uncomposed doc flag,
now that the children's connectedness doesn't depend on the shadow root's.

Differential Revision: https://phabricator.services.mozilla.com/D3715
2018-08-20 11:56:27 +00:00
shindli
ccab0e0f23 Backed out changeset 39f61de4e7bb (bug 1484478) for bustages in /builds/worker/workspace/build/src/dom/base/ShadowRoot.cpp:526:20 2018-08-20 14:21:08 +03:00
Emilio Cobos Álvarez
2e3815789f Bug 1484478 - Use a node bit for connectedness. r=smaug
While trying to repro bug 1484293 I noticed that this assertion failed:

https://searchfox.org/mozilla-central/rev/ef8b3886cb173d5534b954b6fb7eb2d94a9473d0/dom/base/ShadowRoot.cpp#160

(during unlink, while unbinding the kids)

We rely on GetComposedDoc returning the right thing during unbind to cleanup
some stuff (see bug 1473637 for example), so it should probably be correct all
the time, regardless of whether something is unlinked or not.

Also this makes GetComposedDoc() much faster, which is nice too, since we call
it somewhat often.

I removed NodeHasRelevantHoverRules, since it's unused (was used by the old
style system).

I moved the SetIsConnected(false) call for the shadow root to before unbinding
the kids for consistency with what Element does with the uncomposed doc flag,
now that the children's connectedness doesn't depend on the shadow root's.

Differential Revision: https://phabricator.services.mozilla.com/D3715
2018-08-19 18:22:48 +00:00
Brian Grinstead
cdb4dadaed Bug 1478999 - Don't check for -moz-binding on dropmarker to avoid getting computed style in GetBindingURL;r=emilio
This is slow to do when the element isn't visible, and we know it
won't have a XBL binding anyway, since it's a Custom Element.

Differential Revision: https://phabricator.services.mozilla.com/D3539
2018-08-17 16:41:59 +00:00
Olli Pettay
58842dd6be Bug 1484040, unbind shadow DOM content when uninstalling shadow DOM based XML Pretty Printer, r=timdream 2018-08-17 02:49:16 +03:00
Csoregi Natalia
aa79395ba6 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
Brad Werth
e2a18bb32d Bug 1479508 Part 2: Change GetElementsWithGrid to use a more conservative traversal that skips subtrees without frames. r=bz
MozReview-Commit-ID: 1hTQD8LoLQw
2018-08-01 15:33:06 -07:00
Olli Pettay
a5ec8bf01d Bug 1469521 - Change storage of previous and next children in nsINode, r=bz 2018-08-06 22:29:27 +03:00
Olli Pettay
9fd155ce85 Bug 1481501 - cleanup AttrArray, r=mrbkap 2018-08-07 22:11:11 +03:00
Olli Pettay
bcb0ac8885 Bug 1481399 - rename nsAttrAndChildArray to AttrArray, r=mrbkap 2018-08-07 22:07:26 +03:00
Coroiu Cristina
8121b86ac9 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
2fa5de5125 Bug 1479508 Part 2: Change GetElementsWithGrid to use a more conservative traversal that skips subtrees without frames. r=bz
MozReview-Commit-ID: 1hTQD8LoLQw
2018-08-01 15:33:06 -07:00
Noemi Erli
d51469cc11 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-02 12:04:24 +03:00
Jan de Mooij
48d34e468e Bug 1479363 part 1 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/base. r=bz 2018-08-02 08:48:40 +02:00
Xidorn Quan
f21ef958b7 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
This change also renames several related functions, as well as fields,
and the header is moved into EXPORTS.mozilla given it is defined under
mozilla namespace.

MozReview-Commit-ID: LqCdcW8fmUN
2018-08-01 16:14:26 +10:00
Emilio Cobos Álvarez
bc847c0eef Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

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

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Jan de Mooij
fddc23c346 Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Olli Pettay
53f249f6f5 Bug 1100912, make dir-state to propagate through shadow DOM, r=mrbkap 2018-07-21 13:11:06 +03:00
Neil Deakin
9e6b6a2ce5 Bug 1461742, add a mechanism so that custom elements can implement interfaces akin to XBL implements. This is accomplished by an additional chrome-only callback getCustomInterface that can be implemented by custom elements, r=bz 2018-07-19 08:38:45 -04:00
Csoregi Natalia
b960977d00 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
6d13bb1a40 Bug 1461742, add a mechanism so that custom elements can implement interfaces akin to XBL implements. This is accomplished by an additional chrome-only callback getCustomInterface that can be implemented by custom elements, r=bz 2018-07-19 06:15:26 -04:00
Emilio Cobos Álvarez
63720a5a22 Bug 1475203: Fix id table handling in UnbindFromTree(). r=smaug
Only remove from the table when we're actually disconnecting the
element from the shadow root.

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

MozReview-Commit-ID: 1Ubdz57PNc0
2018-07-12 14:10:40 +02:00
Boris Zbarsky
3101b2e50b Bug 820891 part 3. Make scroll* properties for tables work with the table wrapper box, not the table box. r=dholbert 2018-07-10 09:28:11 -07:00
Boris Zbarsky
0ed8c5e80d Bug 820891 part 2. Make client* properties for tables work with the table wrapper box, not the table box. r=dholbert 2018-07-10 09:28:09 -07:00
Jonathan Kingston
1a7a6c0746 Bug 1469592 - Add support for Element.toggleAttribute. r=bzbarsky,smaug!
MozReview-Commit-ID: KkDLMlQgESs

Differential Revision: https://phabricator.services.mozilla.com/D1710
2018-07-03 19:12:49 +00:00
Olli Pettay
9a87f70a87 Bug 1331334 - Implement :defined pseudo-class for custom elements, r=emilio 2018-06-28 14:55:45 +03:00
Olli Pettay
f8aa01762a Bug 1440382, there should be no is-attribute, only internal is-value, in custom elements, r=mrbkap 2018-06-28 14:22:58 +03:00
Margareta Eliza Balazs
b57e2f6130 Backed out changeset 9fe49c825ba3 (bug 1440382) for causing bustage in builds/worker/workspace/build/src/dom/base/nsNodeUtils.cpp 2018-06-28 14:00:18 +03:00
Olli Pettay
c3707b2e13 Bug 1440382, there should be no is-attribute, only internal is-value, in custom elements, r=mrbkap 2018-06-28 13:39:05 +03:00
Emilio Cobos Álvarez
e0b10035ea Bug 1470545: Add chromeonly "shadowrootattached" event for devtools. r=smaug
Summary:

document.addEventListener("shadowrootattached", e => {
  // Do stuff with composedTarget.
});

I didn't bother to add tests for the event itself since this is going to get
tested in bug 1449333, but I can look into writing a chrome mochitest if you
want.

Test Plan: See above.

Reviewers: smaug

Bug #: 1470545

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

MozReview-Commit-ID: 55cVMSsznMS
2018-06-27 11:24:43 +02:00
Jeff Gilbert
70a22b2878 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Olli Pettay
2e64f41c9f Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv
The idea with this patch is that style code will first call
InlineStyleDeclarationWillChange before style declaration has changed, and SetInlineStyleDeclaration once it has changed.

In order to be able to report old attribute value, InlineStyleDeclarationWillChange reads the value and also calls AttributeWillChange (so that DOMMutationObserser can grab the old value). Later SetInlineStyleDeclaration passes the old value to
SetAttrAndNotify so that mutation events and attributeChanged callbacks are handled correctly.

Because of performance, declaration can't be cloned for reading the old value. And that is why the recently-added callback is used to detect when declaration is about to change (bug 1466963 and followup bug 1468665).

To keep the expected existing behavior, even if declaration isn't changed, but just a new declaration was created (since there wasn't any), we need to still run all these
willchange/set calls. That is when the code has 'if (created)' checks.

Since there are several declaration implementation and only nsDOMCSSAttributeDeclaration needs the about-to-change callback, GetPropertyChangeClosure is the one to initialize the callback closure, and the struct which is then passes as data to the closure.

Apparently we lost mutation event testing on style attribute when the pref was added, so test_style_attr_listener.html is modified to test both pref values.
2018-06-26 12:54:00 +03:00
Chris Peterson
f7ceeaf5cf Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr
2018-06-17 22:43:11 -07:00
Timothy Guan-tin Chien
4ca98dc20c Bug 1437956 - Pretty print XML with Shadow DOM r=smaug
This patch puts the transformed pretty print DOM into a Shadow DOM.
The stylesheet is loaded with an @import in a <style> block, so the
monospace stylesheet had to be left out.

The XBL binding is kept, pending removal when Shadow DOM ships.
It's still needed to handle the case when Shadow DOM is pref'd off too.

MozReview-Commit-ID: DQRsXB8tumF
2018-06-01 17:45:11 +08:00
Emilio Cobos Álvarez
8fe74d7d03 Bug 1469276: Remove some unnecessary nsAttrAndChildArray usage. r=smaug
We relied already in DestroyContent not fiddling with child lists, so added
assertions to that effect.

The GetChildCount comment in UnbindSubtree looks outdated (there's no
GetChildCount impl which does anything like creating children).

MozReview-Commit-ID: 6UXVbT6Urgt
2018-06-18 16:07:07 +02:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nazım Can Altınova
4e99e486f8 Bug 1464496 - Part 1: Merge ServoDeclarationBlock and DeclarationBlock r=emilio
MozReview-Commit-ID: By9fV70Oq0K
2018-05-30 18:15:25 +02:00