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

773 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Cosmin Sabou 1f9b4f0f06 Merge inbound to mozilla-central. a=merge 2018-01-17 11:46:53 +02:00
Andrea Marchesini 05c32178fd Bug 1425440 - Replace RemoveChildAt_Deprecated with RemoveChildNode in nsContentUtils, r=catalinb 2018-01-16 18:59:54 +01:00
Edgar Chen 629d03627c Bug 1420377 - Avoid atomizing 'is' value twice when the custom element is created from parser; r=smaug
MozReview-Commit-ID: JHw3di1Q9E9

--HG--
extra : rebase_source : a1f1ac6ddefc7d2ffb543eb30fc41c868f050288
2017-11-24 16:57:00 +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
Emilio Cobos Álvarez 339814eda4 Bug 1427677: Get rid of nsContentUtils::HasDistributedChildren. r=bz
The whole function doesn't have much sense.

I killed its only DOM use in bug 1427511.

Now it only has two callers in nsCSSFrameConstructor, which basically only want
to know whether the children of the same node can have different flattened tree
parents.

So let's check that directly instead (checking whether the element has a binding
or a shadow root), and simplify a bit other surrounding code while at it.

Leave the XUL popup / menubar code doing the broken thing they were doing
beforehand, because it doesn't look to me like it's trivial to fix... They're
effectively assuming that the children of the menupopup end up in a single
insertion point, which is true, but doesn't need to be. Maybe they should walk
the DOM tree? Don't want to dig into that right now, since XUL insertion points
can be filtered and all that... Not fun.

Also, this removes the broken optimization that used to check
mParentFrame->GetContent()->HasChildren(), because it's pretty broken. It used
to be relevant before bug 653881, because <children> element used to not exist,
but now the insertion point at least needs to contain the <children> element all
the time.

There even used to be a XXX comment saying that the optimization didn't work,
which was removed in:

  https://hg.mozilla.org/mozilla-central/rev/2d8585ec74b3

We could still check for "no insertion points", and optimize that, but it
doesn't seem worth it.

MozReview-Commit-ID: L4lspkxKENr
2018-01-09 20:50:17 +01:00
Ben Kelly 223b11ff62 Bug 1426977 P2 Add StorageAllowedForNewWindow() to support docshell service worker checks. r=mystor 2018-01-08 20:25:53 -05:00
John Dai d480d5e221 Bug 1419662 - Fix incorrect custom element type in CustomElementData. f=echen, r=smaug 2018-01-07 18:45:00 +02:00
Andrea Marchesini 4fe8b382b6 Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 20 - DevTools enabled, r=asuth 2018-01-08 14:05:06 +01:00
Andrea Marchesini 2bfde4fc2d Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 19 - Resist finger-printing enabled, r=asuth 2018-01-08 14:05:06 +01:00
Andrea Marchesini f4ab91bebc Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 13 - Streams API enabled, r=asuth 2018-01-08 14:05:05 +01:00
Andrea Marchesini 4e9579eb6c Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 12 - Push enabled, r=asuth 2018-01-08 14:05:05 +01:00
Andrea Marchesini c05772d855 Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 11 - Promise Rejection Event enabled, r=asuth 2018-01-08 14:05:04 +01:00
Andrea Marchesini 61778fdf43 Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 5 - Performance logging enabled, r=asuth 2018-01-08 14:05:04 +01:00
Andrea Marchesini 1a7b13aab4 Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 1 - dump enabled, r=asuth 2018-01-08 14:05:03 +01:00
Andrea Marchesini 6ee7f4e6f3 Bug 1425321 - Renaming nsINode::RemoveChildAt to RemoveChildAt_Deprecated, r=catalinb 2018-01-03 14:01:03 +01:00
Andrea Marchesini 00e79ef07b Bug 1425321 - Renaming nsINode::GetChildAt to GetChildAt_Deprecated, r=catalinb
We want to deprecate nsINode::GetChildAt as the first step of removing DOM node
child array storage. See bug 651120.
2018-01-03 13:59:54 +01:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
David Teller 10402d0590 Bug 1409852 - nsContentUtils::ExtractErrorValues with nsAString;r=bz
nsContentUtils::ExtractErrorValues converts `aSourceSpecOut` from
UTF-16 to UTF-8, which is generally not what we want. This patch
introduces a new version of ExtractErrorValues that doesn't perform
the conversion. To keep the patch short and avoid rewriting existing
clients, the existing version of the function is left in place.

MozReview-Commit-ID: J2NQb5ZCfht

--HG--
extra : rebase_source : c2bec753280bf7a2ea92d350ff42c03a8fd808b4
2017-12-12 18:20:06 -06:00
Emilio Cobos Álvarez d5196e4079 Bug 1426494: Share more code among Document / ShadowRoot. r=smaug
MozReview-Commit-ID: C4cJrSFPnIb
2017-12-22 01:56:17 +01:00
Csoregi Natalia 9743e10556 Backed out 3 changesets (bug 1409852) for build bustage and failing test_js_dev_error_interceptor.js. r=backout on a CLOSED TREE
Backed out changeset 06368bf1a32c (bug 1409852)
Backed out changeset 46fce9a2622d (bug 1409852)
Backed out changeset 649d7bdf80ad (bug 1409852)
2017-12-21 15:31:27 +02:00
David Teller 533c311f31 Bug 1409852 - nsContentUtils::ExtractErrorValues with nsAString;r=bz
nsContentUtils::ExtractErrorValues converts `aSourceSpecOut` from
UTF-16 to UTF-8, which is generally not what we want. This patch
introduces a new version of ExtractErrorValues that doesn't perform
the conversion. To keep the patch short and avoid rewriting existing
clients, the existing version of the function is left in place.

MozReview-Commit-ID: J2NQb5ZCfht

--HG--
extra : rebase_source : c2bec753280bf7a2ea92d350ff42c03a8fd808b4
2017-12-12 18:20:06 -06:00
Cosmin Sabou 4620ebda6e Backed out 3 changesets (bug 1426494) for build bustages on dom/base/FuzzingFunctions.h:25:44 r=backout on a CLOSED TREE
Backed out changeset 8d07cb1ef232 (bug 1426494)
Backed out changeset 74a8ebb0f5d3 (bug 1426494)
Backed out changeset 07c4aa18a0b6 (bug 1426494)
2017-12-21 03:09:22 +02:00
Emilio Cobos Álvarez 7e7dee971b Bug 1426494: Share more code among Document / ShadowRoot. r=smaug
MozReview-Commit-ID: C4cJrSFPnIb
2017-12-21 00:24:27 +01:00
Emilio Cobos Álvarez 27c288f0e2 Bug 1426536: Remove nsContentUtils::IsContentInsertionPoint. r=smaug
We're not going to need it in Shadow DOM v1.

MozReview-Commit-ID: HOokTPlm2Wt

--HG--
extra : rebase_source : 2f746eafb9fa2b14cfe05233d67bf34b80105a44
2017-12-20 22:45:19 +01:00
Ben Kelly 0240c2751f Bug 1426253 P3 Use the window/document GetController() method. r=asuth 2017-12-20 10:53:18 -05:00
Jonathan Kew 1a613e00cb Bug 1424898 - patch 2 - De-virtualize nsIWordBreaker and rename to mozilla::intl::WordBreaker. r=m_kato
--HG--
rename : intl/lwbrk/nsSampleWordBreaker.cpp => intl/lwbrk/WordBreaker.cpp
rename : intl/lwbrk/nsIWordBreaker.h => intl/lwbrk/WordBreaker.h
2017-12-13 22:17:38 -06:00
Jonathan Kew 574a922078 Bug 1424898 - patch 1 - De-virtualize nsILineBreaker and rename to mozilla::intl::LineBreaker. r=m_kato
--HG--
rename : intl/lwbrk/nsJISx4051LineBreaker.cpp => intl/lwbrk/LineBreaker.cpp
rename : intl/lwbrk/nsILineBreaker.h => intl/lwbrk/LineBreaker.h
2017-12-13 22:17:32 -06:00
Gurzau Raul 321347c110 Backed out 22 changesets (bug 1419771) for build bustage build/src/dom/base/FuzzingFunctions.cpp on a CLOSED TREE
Backed out changeset b2b7b46c8ad0 (bug 1419771)
Backed out changeset 0206657d2ea2 (bug 1419771)
Backed out changeset f0f4b98a07b6 (bug 1419771)
Backed out changeset 4b52904694f4 (bug 1419771)
Backed out changeset 9f40cc12d6c6 (bug 1419771)
Backed out changeset f500a61f564c (bug 1419771)
Backed out changeset 0bd9d964df8a (bug 1419771)
Backed out changeset 1397a6bbb446 (bug 1419771)
Backed out changeset 7e77a00fa8b5 (bug 1419771)
Backed out changeset 5f6df771459a (bug 1419771)
Backed out changeset 7624e70b2965 (bug 1419771)
Backed out changeset b9d674bdc723 (bug 1419771)
Backed out changeset 5e44aeda4196 (bug 1419771)
Backed out changeset 601b49f51b41 (bug 1419771)
Backed out changeset d12dc5557982 (bug 1419771)
Backed out changeset 6c863ab2e986 (bug 1419771)
Backed out changeset 0866d79873ab (bug 1419771)
Backed out changeset 8ecc91474621 (bug 1419771)
Backed out changeset 19b14deed8fe (bug 1419771)
Backed out changeset 000c8d5fbc03 (bug 1419771)
Backed out changeset 2e263a2519c5 (bug 1419771)
Backed out changeset b628d9298be8 (bug 1419771)
2017-12-13 23:41:49 +02:00
Andrea Marchesini d8578641ad Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 20 - DevTools enabled, r=asuth 2017-12-13 14:02:46 -06:00
Andrea Marchesini 4dbb2feaf1 Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 19 - Resist finger-printing enabled, r=asuth 2017-12-13 14:02:46 -06:00
Andrea Marchesini 04278a029a Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 13 - Streams API enabled, r=asuth 2017-12-13 14:02:46 -06:00
Andrea Marchesini 03cfc272e6 Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 12 - Push enabled, r=asuth 2017-12-13 14:02:45 -06:00
Andrea Marchesini c9c405725a Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 11 - Promise Rejection Event enabled, r=asuth 2017-12-13 14:02:45 -06:00
Andrea Marchesini a1cad5ae6d Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 5 - Performance logging enabled, r=asuth 2017-12-13 14:02:45 -06:00
Andrea Marchesini 6b770adcfa Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 1 - dump enabled, r=asuth 2017-12-13 14:02:44 -06: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
Jessica Jong b519c97d26 Bug 1422931 - Part 1: Fix crash with slot element. r=smaug 2017-12-09 11:24:58 +08:00
Narcis Beleuzu f0d93dda2c Backed out 2 changesets (bug 1422931) for crashtest failures on dom/base/crashtests/1419799.html r=backout on a CLOSED TREE
Backed out changeset 60d9744e3fc4 (bug 1422931)
Backed out changeset cf554d5d70cc (bug 1422931)
2017-12-08 18:27:56 +02:00
Jessica Jong 00fc818c22 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
testcas ends, but nsDocument::DeleteShell is called afterwards. So, we
make the preference per-doc and once it is enabled for a document, it
stays enabled.
2017-12-08 22:17:40 +08:00
Jessica Jong 491af03c03 Bug 1422931 - Part 1: Fix crash with slot element. r=smaug 2017-12-08 22:17:33 +08:00
Jessica Jong 765510cef9 Bug 1419799 - Fix nsContentUtils::IsInSameAnonymousTree in Shadow DOM. r=smaug
No need to consider multiple shadow roots as it is only supported in Shadow DOM
v0, which is deprecated now.

MozReview-Commit-ID: BKemIBiMx1Q
2017-12-08 15:13:19 +08:00
Dorel Luca 1208bc03a7 Merge mozilla-central to autoland r=merge on a CLOSED TREE
--HG--
extra : rebase_source : 5f22b0e83fd5f1b28e0c1ebbcc429c332835eb36
2017-12-07 00:27:29 +02:00
Emilio Cobos Álvarez 74b31155f7 Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD
2017-12-06 16:05:59 +01:00
Luca Greco edaec7544b Bug 1406675 - Allow storages in WebExtensions on customized cookieBehavior and lifetimePolicy prefs. r=asuth,aswan
This commit ensures that WebExtension principals always get a nsICookieService::BEHAVIOR_ACCEPT
cookieBehavior and a nsICookieService::ACCEPT_NORMALLY aLifetimePolicy:

- the webextension pages are still able to use indexedDB and localStorage on a globally
  configured:

  "network.cookie.cookieBehavior = 2"

  ("Accept cookies from websites" unchecked in the about:preferences
  "use custom settings for history" section)

- the webextension pages' localStorage does not switch in session-only mode on a globally
  configured:

    "network.cookie.lifetimePolicy = 2"

  ("Keep until I close Firefox" in the about:preferences
  "use custom settings for history" section)


MozReview-Commit-ID: 5LOCvCgcokM

--HG--
extra : rebase_source : 419dfdf953d7d49c0a3893da3242b43904155597
2017-11-10 00:49:33 +01:00
Gurzau Raul 9197ca87b9 Backed out 2 changesets (bug 1423167) for build bustage on OSX and Windows on a CLOSED TREE
Backed out changeset a83339d160f1 (bug 1423167)
Backed out changeset a27e933a27b6 (bug 1423167)
2017-12-06 12:18:24 +02:00
Emilio Cobos Álvarez 66e359331d Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD

--HG--
extra : rebase_source : bcc1c98bd6b1f865760f2db33f2427a833a89196
2017-12-05 18:05:51 +01:00
Jessica Jong 306e4bafc3 Bug 1409975 - Part 2: Include slots in the flat tree. r=smaug,emilio
We should consider slot as a parent in ChildIterator: if slot's
`assignedNodes` is not empty, use `assignedNodes`, otherwise, use direct
children as fallback content.
Also, GetFlattenedTreeParentNodeInternal should be changed to use
`assignedSlot` instead of `DestInsertionPoints`.
2017-12-04 16:06:37 +08:00