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

2853 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou 7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Martin Stransky 8ddc948f81 Bug 1433667 - Honour system titlebar button left/right placement, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D16466

--HG--
extra : moz-landing-system : lando
2019-01-18 13:52:29 +00:00
Martin Stransky 53be695239 Bug 1490344 - [Linux/Gtk] Enable hidden system titlebar by default on Gnome, r=dao
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).

It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.

It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 12:44:49 +00:00
xftroxgpx 814cf0a225 Bug 1520418 - Ensure the empty array header has enough alignment to avoid creating unaligned pointers. r=froydnj
See https://github.com/servo/servo/issues/22613.
2019-01-16 15:51:49 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Cameron McCormack 0de25813f2 Bug 1519011 - Make counterstyles.css sharable r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16240

--HG--
extra : moz-landing-system : lando
2019-01-10 22:27:09 +00:00
Cameron McCormack b05708ce89 Bug 1500362 - Make GkAtoms opaque to avoid lld-link.exe errors r=emilio
Depends on D15078

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

--HG--
extra : moz-landing-system : lando
2019-01-07 09:50:25 +00:00
quasicomputational baf06c6032 Bug 1422235 - Implement the 'overflow-inline' media query. r=emilio 2018-12-28 02:16:59 +01:00
quasicomputational 20fa93316d Bug 1422235 - Implement the 'overflow-block' media query. r=emilio 2018-12-28 02:16:53 +01:00
Jan Henning 7fb92b8c44 Bug 1478776 - Part 10: Add internal VisualViewport resize/scroll events. r=botond,nika
The VisualViewport events are all nice and shiny, but unfortunately not quite
what is needed for the session store.

Firstly, the spec wants the "scroll" event to be fired only when the *relative*
offset between visual and layout viewport changes. The session store however
records the absolute offset and as such is interested in when *that* changes.

Secondly, again as per the spec the events don't bubble, and with the default
DOMEventTargetHelper implementation they don't escape the VisualViewport during
capturing, either. This means that any event listener must be added directly on
the VisualViewport itself in order to capture any events.

This might have been intended because the events use the same names as the
normal "scroll"/"resize" events, and as such you cannot specify separate event
listeners for VisualViewport and non-VisualViewport "scroll" events if both
events end up being dispatched to the same element (you can only try to filter
after the fact by looking at the originalTarget of the event).

At the same time, the VisualViewport is attached to the inner Window, and so
each time you navigate, you also get a different VisualViewport object.
All of this might be totally fine from the perspective of a page script, because
in that case you won't care anyway about what happens when the current page goes
away.

From the session store perspective on the other hand (especially Fennec's non-
e10s session store design), this is rather unfortunate because we don't want to
have to keep registering event listeners
a) manually for each subframe
b) each time the page navigates

The event target chain problem could be solved by letting the scroll events
escape the VisualViewport during the capturing phase (which the spec doesn't say
anything about), but this would mean that any scroll listener attached to a
window/browser/... that uses capturing will now catch both layout and visual
viewport scroll events.

In some cases this might even be beneficial, but in others (e.g. bug 1498812
comment 21) I'd like to specifically decide which kind of scroll event to
capture. Having to look at event.originalTarget to distinguish the two kinds
might be defensible in test code, but in case this distinction would be needed
in production code as well, given the existence of a C++-based filtering helper
in nsSessionStoreUtils for another use case where (scroll) events need to be
filtered, JS-based scroll event filtering might be a bad idea.

Additionally, in any case this wouldn't solve the fundamental conflict between
the spec and the session store about *when* the "scroll" event should be fired
in the first place.

Hence I'd like to introduce a separate set of events with distinct event names,
which will be dispatched according to the requirements of our internal users
(i.e. currently the session store). To avoid potential web compatibility issues
down the road, for now these events will be dispatched only to event listeners
registered in the system group (allowing *all* Chrome event listeners cannot be
done because checking the Chrome status of each event target might be too
expensive for frequently dispatched events).

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

--HG--
extra : moz-landing-system : lando
2018-12-20 22:14:42 +00:00
Nathan Froyd 5b851f9038 Bug 1515376 - remove aggregation support from nsProperties; r=mccr8
This support is currently unused.
2018-12-19 13:16:43 -05:00
Jonathan Kingston c5d29c382e Bug 903372 - Remove xml:base from parser. r=hsivonen 2018-12-13 15:47:01 +00:00
Andrea Marchesini c7a7810165 Bug 1513890 - Get rid of x-moz-errormessage attribute, r=edgar 2018-12-15 09:54:02 +01:00
Sylvestre Ledru ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Emilio Cobos Álvarez 26110eea9b Bug 1513015 - Remove unneeded inherit-scroll-behavior class. r=botond
Use a more general rule instead, since we add the class unconditionally.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 18:03:44 +00:00
Brian Hackett 8362865d65 Bug 1510724 Part 1 - Add accessor for wrapped PLDHashTable operations, r=froydnj.
--HG--
extra : rebase_source : 49cb109c6c0b630feab52e82a711249b5c2443ea
2018-11-28 09:09:01 -10:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andreea Pavel 0c29092e41 Backed out 2 changesets (bug 903372) for multiple failures on a CLOSED TREE
Backed out changeset bf919773f9d1 (bug 903372)
Backed out changeset 6562c2392ac9 (bug 903372)
2018-11-30 04:16:21 +02:00
Jonathan Kingston 7c7d460eaa Bug 903372 - Remove xml:base from parser. r=hsivonen 2018-10-21 12:55:44 +01:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Andrew McCreight 68a1d4dad7 Bug 1508818, part 3 - Shrink comments so they don't get poorly reflowed by clang-format. r=froydnj
Clang format does not always reflow comments correctly to get them
within 80 columns.

The major categories of failures I have noticed in xpcom/ are:

- Comments that are lists. I fixed these by manually getting them so
  they'll be within 80 columns after clang-format runs.

- Comments intermixed with lists of things like enums, initializers,
  or even fields in a class. It doesn't seem to associate the comment
  with the item in the list correctly. The worst cases of these happen
  when it changes initializer lists from having commas at the start of
  each item to having them at the end. In the initializer comma cases,
  I fixed them by making the commas at the end, so clang-format won't
  mix things up. For other cases, I often moved the comment for an
  item onto its own line, because it was not possible to have both the
  comment and the item on the same line and stay within 80 columns.

- One odd case is nsEnumeratorUtils.cpp, where the end of line comment
  after a NS_DECL macro confused clang-format and made it stop
  realizing that the NS_DECL thing was a complete statement. I also
  added a blank line to that file before a declaration because I think
  that is better.

Depends on D13183

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:09 +00:00
Andrew McCreight a22e686056 Bug 1508818, part 2 - Remove DEBUG_rickg from nsDeque.cpp. r=froydnj
Clang format makes this code look pretty bad, but I think it is safe
to just remove it.

Depends on D13182

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:07 +00:00
Gabriele Svelto 19e52bebd4 Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240

--HG--
extra : moz-landing-system : lando
2018-11-28 17:25:23 +00:00
Emilio Cobos Álvarez b65d0757d1 Bug 1509720 - Inline atom refcounting. r=njn
We're paying two function calls from Gecko_AddRefAtom /
Gecko_ReleaseAtom for no good reason, plus it's simple enough it's probably
worth to inline it anyway for C++ callers.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 15:03:40 +00:00
Nathan Froyd 790af83dcc Bug 1460674 - part 3 - make PLDHashTable iteration faster; r=njn
The core loop of Iterator::Next() requires multiple branches, one to
check for entry liveness and one to check for wraparound.  We can
rewrite this to use masking instead, as well as iterating only over the
hashes, and reconstructing the entry pointer when we know we've reached
a live entry.  This change cuts the time taken on the collections
benchmark by the iteration portion in half.
2018-11-26 16:24:50 -05:00
Nathan Froyd 529e9249dd Bug 1460674 - part 2 - reorganize PLDHashTable's internal storage; r=njn
As discussed in the previous commit message, PLDHashTable's storage
wastes space for common entry types.  This commit reorganizes the
storage to store all the hashes packed together, followed by all the
entries, which eliminates said waste.
2018-11-26 16:24:50 -05:00
Nathan Froyd d848c8a50e Bug 1460674 - part 1 - change PLDHashTable internals to work on slots; r=njn
PLDHashTable requires that all items stored therein inherit from
PLDHashEntryHdr:

struct PLDHashEntryHdr {
  // PLDHashNumber is a uint32_t.
  PLDHashNumber mKeyHash; // Cached hash key for object.
};

class MyType : public PLDHashEntryHdr {
  // Data members, etc.
};

PLDHashEntryHdr::mKeyHash is used to cache the computed hash value of
the entry, so we aren't rehashing entries on every lookup/add/etc.

Because of structure layout requirements on 64-bit platforms, the data
members of MyType will typically start at offset 8:

MyType, offset 0: mKeyHash
MyType, offset 4: padding required by alignment
MyType, offset 8: first data member of MyType
MyType, offset N: ...

The padding at offset 4 is dead, unused space.

We'd like to change this state of affairs by having PLDHashTable manage
the cached hash key itself, which would eliminate the dead space in the
object and would enable packing the table storage more tightly.  But
PLDHashTable pervasively assumes that its internal storage is an array
of PLDHashEntryHdrs (with an associated object size to account for
subclassing).

As a first step to laying out the hash table storage differently, we
have to make the internals of PLDHashTable not access PLDHashEntryHdr
items directly, but layer an abstraction on top.  We call this
abstraction "slots": a slot represents storage for the cached hash key
and the associated entry, and can produce a PLDHashEntryHdr* on demand.
2018-11-26 16:24:50 -05:00
Nathan Froyd 7c8ce06436 Bug 1460674 - part 0b - stop trying to be const-correct in Get(); r=njn
The only place where this is used where the const-ness matters is in
AddressEntry, and that use const_cast's away the const-ness.  So let's
just ditch the method that attempts to return const pointers.
2018-11-26 16:24:50 -05:00
Nathan Froyd d98ab29fdb Bug 1460674 - part 0a - store the hash table entry size in iterators; r=njn
This change is satisfying insofar as it removes a load from every
iteration step over the hashtable, but it doesn't seem to affect
our collection benchmarks in any way.  The change does not make
iterators any larger, as there is padding at the end of the iterator
structure on both 32- and 64-bit platforms.
2018-11-26 16:24:50 -05:00
Nathan Froyd eaf93d7334 Bug 1509916 - use less C-style casting in nsTHashtable.h; r=erahm 2018-11-26 12:39:11 -05:00
Tim Nguyen 044d8ca731 Bug 1508142 - Remove remains of tree cell-based selection code. r=bzbarsky,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D12225

--HG--
extra : moz-landing-system : lando
2018-11-22 09:59:02 +00: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
Gabriele Svelto 3521fc20c7 Bug 1502284 - Cleanup of the observer service code r=erahm
This refactors the observer service code to improve readability, uses MOZ_TRY
and other checking macros wherever possible to simplify error handling and
replaces the ObserverRef class with the more generic nsMaybeWeakPtr class.
This cuts away some code and halves the amount of memory needed to store an
event listener. The external behavior is almost unchanged save for some error
codes which are now more specific.

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

--HG--
extra : source : 10d910aa9f31435116a718bafe8a2b71c61fe23d
2018-11-12 11:04:17 +01:00
Boris Zbarsky 64ae41821b Bug 1507540 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj 2018-11-19 20:20:05 -05:00
Nathan Froyd 1ae4750ecb Bug 1506730 - remove PLDHashTable::Iterator::mStart; r=njn
We only use its value in one place, and said value is easily computable
from readily available information.  This change makes iterators
slightly smaller.
2018-11-19 09:54:04 -05:00
Nika Layzell 589d2a7b6f Bug 1477432 - Part 10: Stop using nsIJSID in nsIArray for optional IID parameters, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D9732
2018-11-16 17:27:46 -05:00
Cameron McCormack 192bc50b77 Bug 1507687 - Add static atoms for strings in UA style sheets r=njn
Differential Revision: https://phabricator.services.mozilla.com/D12092

--HG--
extra : moz-landing-system : lando
2018-11-16 06:37:41 +00:00
Cameron McCormack 62dd9713e0 Bug 1507656 - Adjust nsGkAtoms.h comments for ASCII lowercase flag r=njn
Differential Revision: https://phabricator.services.mozilla.com/D12078

--HG--
extra : moz-landing-system : lando
2018-11-16 02:21:21 +00:00
Andrea Marchesini 33c61a5c80 Bug 1492036 - Reporting API - part 6 - FeaturePolicy, r=smaug 2018-11-14 20:02:33 +01:00
Andrea Marchesini db43f2464c Bug 1492036 - Reporting API - part 3 - Deprecate reports, r=smaug 2018-11-14 20:02:33 +01:00
Brian Grinstead 35b0511c9a Bug 1425874 - Implement HTMLMarqueeElement r=bzbarsky
This adds a new class for the marquee tag, instead of overloading HTMLDivElement.
It removes some of the XBL that was used to expose properties to web content.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 05:29:11 +00:00
Emilio Cobos Álvarez 6ca25ecbe6 Bug 1499170 - Add an atom bit to know whether we're ascii lowercase. r=njn
And thus massively speed up ascii-case-insensitive atom comparisons when both
atoms are lowercase (which is the common case by far).

This removes almost all the slow selector-matching in this page, and it seems
an easier fix than storing the lowercased version of all class-names in quirks
mode in elements and selectors...

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

--HG--
extra : moz-landing-system : lando
2018-11-13 12:47:40 +00:00
Emilio Cobos Álvarez 03ce7b0699 Bug 1392185 - Remove dynamic HTML5 atoms. r=njn,hsivonen
This is a rebase + manual refcounting on some places, + cleanup of the original
patch in the bug.

Co-authored-by: Nicholas Nethercote <nnethercote@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D11035
2018-11-09 14:45:30 +01:00
Ting-Yu Lin a1e36d1d46 Bug 1421105 Part 2 - Implement column-span for block and inline frames. r=bzbarsky,dbaron
Other frames calling InitAndWrapInColumnSetFrameIfNeeded() needs to be
modified to support column-span (bug 1489295).

Depends on D5208

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

--HG--
extra : moz-landing-system : lando
2018-10-30 05:41:30 +00:00
Brendan Dahl 9058324771 Bug 1490464 - Fix XUL attribute persistence for browser.xhtml. r=smaug
Move XUL persistence handling into it's own class and make it a separate
nsIDocumentObserver so it can also be used in non-XUL documents.
To avoid adding persistence to all non-XUL documents, a document must add
the "mozpersist" attribute to the root element if it wants enable the
feature.

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

--HG--
extra : moz-landing-system : lando
2018-11-06 21:45:20 +00:00
Emilio Cobos Álvarez bc8766b7fc Bug 1462233 - Implement the env() function with hardcoded zeros for safe-area-inset. r=heycam,firefox-style-system-reviewers
Intent to Implement and Ship: https://groups.google.com/d/msg/mozilla.dev.platform/EVKyR1B87T0/_l-_qK8SAAAJ

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

--HG--
extra : moz-landing-system : lando
2018-11-05 10:39:46 +00:00
Gabriele Svelto 266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Nika Layzell 5b24f801f7 Bug 1500927 - Add copy-free jsstring support to perfecthash.py, r=bzbarsky
This is needed for bug 1500926. It takes the approach of taking a JSFlatString
and using AutoAssertCannotGC to read the memory directly from the JS heap.
This lets us avoid re-encoding strings when performing lookups, which can be
advantageous.

Only ASCII strings are supported by this handler, and wide strings are hashed
as though they contain only values under 0x7f. This is OK as invalid keys to
perfecthash may return any hashtable entry.

Differential Revision: https://phabricator.services.mozilla.com/D9405
2018-10-24 20:11:01 -04:00
Ryan Hunt 1601a8bb80 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
This commit adds a scroll origin, nsGkAtoms::relative, which can be used to
mark main thread scrolling that can be combined with a concurrent APZ scroll.

The behavior of this is controlled by a pref, apz.relative-update. This pref
is initially activated and is intended as an aid to narrowing down causes
of regressions for users in bug reports.

Relative scroll updates work by tracking the last sent or accepted APZ
scroll offset. This is sent along with every FrameMetrics. Additionally,
a flag is added to FrameMetrics, mIsRelative, indicating whether the
scroll offset can be combined with a potential APZ scroll. When this
flag is set, AsyncPanZoomController will apply the delta between the sent
base scroll offset, and sent new scroll offset.

This flag is controlled by the last scroll origin on nsGfxScrollFrame. The
new origin, `relative`, is marked as being able to clobber APZ updates,
but can only be set if all scrolls since the last repaint request or
layers transaction have been relative.

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

--HG--
extra : rebase_source : 51351a84c9cda228a0975e22eda3fd3bd8d261c4
extra : histedit_source : 4b564c19b16fe2bd26adc671b62b7cb6106e8163
2018-10-09 23:24:28 -05:00
Jonathan Kingston 580c9a51e4 Bug 1483458 - Change HTML parser to look at .py Atom files. r=hsivonen,heycam
--HG--
extra : amend_source : 9285251fc49d4f56b67557ef77e163d6acbc2b1e
2018-10-17 20:40:37 +01:00
Mats Palmgren 6ec2ba049c Bug 1494745 part 6 - Make ns[Auto]TObserverArray methods that insert/append an Item return void since they're infallible. r=bz 2018-10-14 18:12:23 +02:00
Nicholas Nethercote 613f5099a5 Bug 1460180 - Add a comment about RDF atoms. r=me
DONTBUILD because it's a comment-only change.

--HG--
extra : rebase_source : fc8462fdc4c7f425d7b0c3ce57d25239e6412c7d
2018-10-11 14:42:51 +11:00
Nicholas Nethercote 67bc77d4cf Bug 1497734 - Rename nsStaticAtom subclasses. r=heycam
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

--HG--
extra : rebase_source : b68dd7c73f5036dcd6be4c3700b757441f59f9f2
2018-10-10 16:49:13 +11:00
Nathan Froyd 28aa04a6d1 Bug 1483699 - part 2 - make InsertSlotsAt error checking more thorough; r=mccr8
I don't know what the existing code was trying to do, but it certainly
wasn't clear, and possibly not correct.
2018-10-08 10:39:44 -04:00
Nathan Froyd 1e6d9316da Bug 1483699 - part 1 - add overflow checks for extending arrays; r=mccr8 2018-10-08 10:39:44 -04:00
Ryan Hunt 3771c1bcab Bug 1475139 part 1 - Add move assignment operator to nsTHashtable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D6780

--HG--
extra : rebase_source : 516c2a8fb8c9c8dbb2e9927e1906b552d674977d
2018-09-24 21:23:17 -05:00
Tim Nguyen 6e26790a43 Bug 1416363 - Remove colorpicker binding and related code. r=bgrins,surkov
Depends on D7575

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

--HG--
extra : moz-landing-system : lando
2018-10-04 01:03:19 +00:00
Nicholas Nethercote 7398ecce66 Bug 1449787 - Make static atom pointers `constexpr`. r=froydnj,emilio
This saves one word per static atom, per process.

The `nsGkAtoms` change is only a small part of this commit.

In regen_atoms.py:

- There is now only one link name per platform: nsGkAtoms::sAtoms[].

- But there is a new constant per atom, giving the index into
  nsGkAtoms::sAtoms[].

- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
  the index constant.

- A couple of `*mut` pointers are now `*const`.

Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.

--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
2018-10-04 09:16:11 +10:00
Tim Nguyen ffdd467173 Bug 1491688 - Introduce ::-moz-tree-row(blur) selector. r=emilio 2018-10-03 08:55:43 +02:00
Jonathan Watt d42f097af8 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : a8f71572d103c6ad5a84d5ad14a8d83bf2af5d5c
extra : source : ec5d3c12ad4c9b8d3c2eea2b0f71f5dc3c15f15f
2018-09-24 11:45:17 +01:00
Gurzau Raul ca3641419f Merge inbound to mozilla-central. a=merge
--HG--
rename : docshell/test/bug123696-subframe.html => docshell/test/mochitest/bug123696-subframe.html
rename : docshell/test/bug404548-subframe.html => docshell/test/mochitest/bug404548-subframe.html
rename : docshell/test/bug404548-subframe_window.html => docshell/test/mochitest/bug404548-subframe_window.html
rename : docshell/test/bug413310-post.sjs => docshell/test/mochitest/bug413310-post.sjs
rename : docshell/test/bug413310-subframe.html => docshell/test/mochitest/bug413310-subframe.html
rename : docshell/test/bug529119-window.html => docshell/test/mochitest/bug529119-window.html
rename : docshell/test/bug530396-noref.sjs => docshell/test/mochitest/bug530396-noref.sjs
rename : docshell/test/bug530396-subframe.html => docshell/test/mochitest/bug530396-subframe.html
rename : docshell/test/bug570341_recordevents.html => docshell/test/mochitest/bug570341_recordevents.html
rename : docshell/test/bug668513_redirect.html => docshell/test/mochitest/bug668513_redirect.html
rename : docshell/test/bug668513_redirect.html^headers^ => docshell/test/mochitest/bug668513_redirect.html^headers^
rename : docshell/test/bug691547_frame.html => docshell/test/mochitest/bug691547_frame.html
rename : docshell/test/dummy_page.html => docshell/test/mochitest/dummy_page.html
rename : docshell/test/file_anchor_scroll_after_document_open.html => docshell/test/mochitest/file_anchor_scroll_after_document_open.html
rename : docshell/test/file_bfcache_plus_hash_1.html => docshell/test/mochitest/file_bfcache_plus_hash_1.html
rename : docshell/test/file_bfcache_plus_hash_2.html => docshell/test/mochitest/file_bfcache_plus_hash_2.html
rename : docshell/test/file_bug1121701_1.html => docshell/test/mochitest/file_bug1121701_1.html
rename : docshell/test/file_bug1121701_2.html => docshell/test/mochitest/file_bug1121701_2.html
rename : docshell/test/file_bug1151421.html => docshell/test/mochitest/file_bug1151421.html
rename : docshell/test/file_bug1186774.html => docshell/test/mochitest/file_bug1186774.html
rename : docshell/test/file_bug1450164.html => docshell/test/mochitest/file_bug1450164.html
rename : docshell/test/file_bug385434_1.html => docshell/test/mochitest/file_bug385434_1.html
rename : docshell/test/file_bug385434_2.html => docshell/test/mochitest/file_bug385434_2.html
rename : docshell/test/file_bug385434_3.html => docshell/test/mochitest/file_bug385434_3.html
rename : docshell/test/file_bug475636.sjs => docshell/test/mochitest/file_bug475636.sjs
rename : docshell/test/file_bug509055.html => docshell/test/mochitest/file_bug509055.html
rename : docshell/test/file_bug511449.html => docshell/test/mochitest/file_bug511449.html
rename : docshell/test/file_bug540462.html => docshell/test/mochitest/file_bug540462.html
rename : docshell/test/file_bug580069_1.html => docshell/test/mochitest/file_bug580069_1.html
rename : docshell/test/file_bug580069_2.sjs => docshell/test/mochitest/file_bug580069_2.sjs
rename : docshell/test/file_bug590573_1.html => docshell/test/mochitest/file_bug590573_1.html
rename : docshell/test/file_bug590573_2.html => docshell/test/mochitest/file_bug590573_2.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug598895_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug598895_2.html
rename : docshell/test/file_bug634834.html => docshell/test/mochitest/file_bug634834.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug637644_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug637644_2.html
rename : docshell/test/file_bug640387.html => docshell/test/mochitest/file_bug640387.html
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug653741.html
rename : docshell/test/file_bug660404 => docshell/test/mochitest/file_bug660404
rename : docshell/test/file_bug660404-1.html => docshell/test/mochitest/file_bug660404-1.html
rename : docshell/test/file_bug660404^headers^ => docshell/test/mochitest/file_bug660404^headers^
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug662170.html
rename : docshell/test/file_bug668513.html => docshell/test/mochitest/file_bug668513.html
rename : docshell/test/file_bug669671.sjs => docshell/test/mochitest/file_bug669671.sjs
rename : docshell/test/file_bug675587.html => docshell/test/mochitest/file_bug675587.html
rename : docshell/test/file_bug680257.html => docshell/test/mochitest/file_bug680257.html
rename : docshell/test/file_bug703855.html => docshell/test/mochitest/file_bug703855.html
rename : docshell/test/file_bug728939.html => docshell/test/mochitest/file_bug728939.html
rename : docshell/test/file_close_onpagehide1.html => docshell/test/mochitest/file_close_onpagehide1.html
rename : docshell/test/file_close_onpagehide2.html => docshell/test/mochitest/file_close_onpagehide2.html
rename : docshell/test/file_framedhistoryframes.html => docshell/test/mochitest/file_framedhistoryframes.html
rename : docshell/test/file_pushState_after_document_open.html => docshell/test/mochitest/file_pushState_after_document_open.html
rename : docshell/test/historyframes.html => docshell/test/mochitest/historyframes.html
rename : docshell/test/mochitest.ini => docshell/test/mochitest/mochitest.ini
rename : docshell/test/start_historyframe.html => docshell/test/mochitest/start_historyframe.html
rename : docshell/test/test_anchor_scroll_after_document_open.html => docshell/test/mochitest/test_anchor_scroll_after_document_open.html
rename : docshell/test/test_bfcache_plus_hash.html => docshell/test/mochitest/test_bfcache_plus_hash.html
rename : docshell/test/test_bug1045096.html => docshell/test/mochitest/test_bug1045096.html
rename : docshell/test/test_bug1121701.html => docshell/test/mochitest/test_bug1121701.html
rename : docshell/test/test_bug1151421.html => docshell/test/mochitest/test_bug1151421.html
rename : docshell/test/test_bug1186774.html => docshell/test/mochitest/test_bug1186774.html
rename : docshell/test/test_bug123696.html => docshell/test/mochitest/test_bug123696.html
rename : docshell/test/test_bug1450164.html => docshell/test/mochitest/test_bug1450164.html
rename : docshell/test/test_bug384014.html => docshell/test/mochitest/test_bug384014.html
rename : docshell/test/test_bug385434.html => docshell/test/mochitest/test_bug385434.html
rename : docshell/test/test_bug387979.html => docshell/test/mochitest/test_bug387979.html
rename : docshell/test/test_bug402210.html => docshell/test/mochitest/test_bug402210.html
rename : docshell/test/test_bug404548.html => docshell/test/mochitest/test_bug404548.html
rename : docshell/test/test_bug413310.html => docshell/test/mochitest/test_bug413310.html
rename : docshell/test/test_bug475636.html => docshell/test/mochitest/test_bug475636.html
rename : docshell/test/test_bug509055.html => docshell/test/mochitest/test_bug509055.html
rename : docshell/test/test_bug511449.html => docshell/test/mochitest/test_bug511449.html
rename : docshell/test/test_bug529119-1.html => docshell/test/mochitest/test_bug529119-1.html
rename : docshell/test/test_bug529119-2.html => docshell/test/mochitest/test_bug529119-2.html
rename : docshell/test/test_bug530396.html => docshell/test/mochitest/test_bug530396.html
rename : docshell/test/test_bug540462.html => docshell/test/mochitest/test_bug540462.html
rename : docshell/test/test_bug551225.html => docshell/test/mochitest/test_bug551225.html
rename : docshell/test/test_bug570341.html => docshell/test/mochitest/test_bug570341.html
rename : docshell/test/test_bug580069.html => docshell/test/mochitest/test_bug580069.html
rename : docshell/test/test_bug590573.html => docshell/test/mochitest/test_bug590573.html
rename : docshell/test/test_bug598895.html => docshell/test/mochitest/test_bug598895.html
rename : docshell/test/test_bug634834.html => docshell/test/mochitest/test_bug634834.html
rename : docshell/test/test_bug637644.html => docshell/test/mochitest/test_bug637644.html
rename : docshell/test/test_bug640387_1.html => docshell/test/mochitest/test_bug640387_1.html
rename : docshell/test/test_bug640387_2.html => docshell/test/mochitest/test_bug640387_2.html
rename : docshell/test/test_bug653741.html => docshell/test/mochitest/test_bug653741.html
rename : docshell/test/test_bug660404.html => docshell/test/mochitest/test_bug660404.html
rename : docshell/test/test_bug662170.html => docshell/test/mochitest/test_bug662170.html
rename : docshell/test/test_bug668513.html => docshell/test/mochitest/test_bug668513.html
rename : docshell/test/test_bug669671.html => docshell/test/mochitest/test_bug669671.html
rename : docshell/test/test_bug675587.html => docshell/test/mochitest/test_bug675587.html
rename : docshell/test/test_bug680257.html => docshell/test/mochitest/test_bug680257.html
rename : docshell/test/test_bug691547.html => docshell/test/mochitest/test_bug691547.html
rename : docshell/test/test_bug694612.html => docshell/test/mochitest/test_bug694612.html
rename : docshell/test/test_bug703855.html => docshell/test/mochitest/test_bug703855.html
rename : docshell/test/test_bug728939.html => docshell/test/mochitest/test_bug728939.html
rename : docshell/test/test_bug797909.html => docshell/test/mochitest/test_bug797909.html
rename : docshell/test/test_close_onpagehide_by_history_back.html => docshell/test/mochitest/test_close_onpagehide_by_history_back.html
rename : docshell/test/test_close_onpagehide_by_window_close.html => docshell/test/mochitest/test_close_onpagehide_by_window_close.html
rename : docshell/test/test_forceinheritprincipal_overrule_owner.html => docshell/test/mochitest/test_forceinheritprincipal_overrule_owner.html
rename : docshell/test/test_framedhistoryframes.html => docshell/test/mochitest/test_framedhistoryframes.html
rename : docshell/test/test_pushState_after_document_open.html => docshell/test/mochitest/test_pushState_after_document_open.html
rename : docshell/test/test_triggeringprincipal_location_seturi.html => docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
rename : docshell/test/test_windowedhistoryframes.html => docshell/test/mochitest/test_windowedhistoryframes.html
rename : docshell/test/url1_historyframe.html => docshell/test/mochitest/url1_historyframe.html
rename : docshell/test/url2_historyframe.html => docshell/test/mochitest/url2_historyframe.html
rename : third_party/rust/syn/src/parsers.rs => third_party/rust/syn-0.14.6/src/parsers.rs
rename : third_party/rust/syn/src/verbatim.rs => third_party/rust/syn-0.14.6/src/verbatim.rs
rename : third_party/rust/uuid/.travis.yml => third_party/rust/uuid-0.5.1/.travis.yml
rename : third_party/rust/uuid/src/rustc_serialize.rs => third_party/rust/uuid-0.5.1/src/rustc_serialize.rs
rename : third_party/rust/uuid/src/serde.rs => third_party/rust/uuid-0.5.1/src/serde.rs
2018-10-02 19:03:40 +03:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Andrea Marchesini 4be054a731 Bug 1390801 - FeaturePolicy - part 2 - WebIDL + DOM integration, r=ckerschb 2018-10-01 08:09:44 +02:00
Nicholas Nethercote 58812c5536 Bug 1494515 - Remove an unused argument from nsStaticAtom's constructor. r=froydnj
Presumably the commit that introduced `aStringOffset` could have removed this,
but overlooked it.

--HG--
extra : rebase_source : 176f14ce01c18ed4c83892d2b7a9e7a54fb5c836
2018-09-27 16:14:05 +10:00
Nicholas Nethercote e35d805828 Bug 1494515 - Clean up static atom registration. r=froydnj
Static atom registration is a bit of a mess. NS_InitAtomTable() calls
nsGkAtoms::RegisterStaticAtoms(), which calls NS_RegisterStaticAtoms(); i.e. we
go from nsAtomTable.cpp to nsGkAtoms.cpp and back.

(And NS_RegisterStaticAtoms() is declared in a .cpp file, not a .h file!)

This commit makes NS_InitAtomTable() a friend of nsGkAtoms, so NS_InitAtomTable
can see nsGkAtoms's atoms array directly, thus removing the need for
NS_RegisterAtomTable() and nsGkAtoms::RegisterStaticAtoms().

This commit also removes an out-of-date part of a comment from XPCOMInit.cpp.

--HG--
extra : rebase_source : 7e1f9aa0a9f7cb5088159fe4c953948b931f6d68
2018-09-27 16:13:41 +10:00
Nicholas Nethercote dd61fd6ccf Bug 1494515 - Rework the comments about static atoms. r=froydnj
nsGkAtoms.h has a big comment explaining how static atom definitions get
expanded by macros. This comment was very useful when there were multiple
sources of static atoms and their definitions used macros a lot. But bug
1482782 combined all the static atom sources into nsGkAtoms and removed a lot
of macro use. So now the comment is now something of a hindrance, duplicating
quite a bit of the code (and not entirely accurately).

This commit removes the big comment, and moves the still-useful parts inline
with the code. This makes things much easier to follow.

This commit also reformats some of the remaining macros so they are easier to
read.

--HG--
extra : rebase_source : 4377be2fa0edc4ea1f592985ded89acbb76fb104
2018-09-27 16:13:14 +10:00
Nicholas Nethercote 0979695a1a Bug 1489047 - Remove C++ support for, and testing of, the XPIDL DOMString type. r=nika
--HG--
extra : rebase_source : 21df3192cfff8f9d9254306a5be4f8ad84397eb7
2018-09-06 18:03:18 +10:00
Narcis Beleuzu 010feac062 Backed out 2 changesets (bug 1495562, bug 1495554) for crashes on [@ CrashReporter::TerminateHandler()] . CLOSED TREE
Backed out changeset ec5d3c12ad4c (bug 1495562)
Backed out changeset 28792d9adea2 (bug 1495554)
2018-10-02 02:58:09 +03:00
Jonathan Watt 219a2f9e91 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : 6c843092611056972c991175fa18f37cfad57402
2018-09-24 11:45:17 +01:00
Martin Stransky 89822d9f40 Bug 1493145 - [CSD] Enable round corners by default by -moz-gtk-csd-transparent-background media query, r=dao
Replace mozilla.widget.use-argb-visuals pref by -moz-gtk-csd-transparent-background media query at browser.css
to draw transparent background. The media query is set by toolkit code and enabled when compatible
window manager is detected.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 11:53:04 +00:00
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
Kris Maglione c7df4b83d7 Bug 1486147: Follow-up: Fix missing QueryInterface entries. r=bustage
--HG--
extra : rebase_source : 4ab19b5145117f9c9aef87d8d59ad7ff923e299d
2018-09-19 17:34:10 -07:00
Kris Maglione 31cf107646 Bug 1486147: Part 1 - Add JS iterator support to nsIStringEnumerator. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4269

--HG--
extra : rebase_source : 5fe9d4c7717d65e1bc8d45bdd89bcc5384c6d0ee
extra : histedit_source : e8f5606a192f13524996faf2e179d2c2e58c933f%2C725c8f145a1f4d34f84e6818b61ec5b955862e70
2018-08-24 16:21:33 -07:00
Eric Rahm 2fb6934934 Bug 1492204 - Part 3: Remove references to char_iterator. r=froydnj
We can just use 'iterator' now that nsWritingIterator is gone.

--HG--
extra : rebase_source : 3f6fbafc9b57ce89afba581b224b3dc2295fa614
2018-09-18 12:05:23 -07:00
Eric Rahm 0c061732bd Bug 1492204 - Part 1: Stop using deprecated string writing iterators. r=froydnj
This switches over the few remaining usages of the deprecated
BeginWriting/EndWriting(iterator&) functions to the more standard
BeginWriting/EndWriting() functions.

--HG--
extra : rebase_source : 3c54621d4921eb45157ec4edce0b693bdd7f02d5
2018-09-18 09:44:57 -07:00
Marcos Cáceres f616da00ba Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 11:23:33 +00:00
shindli 70bf79757d Backed out changeset 376c2bf5bcbf (bug 1472026) for PaymentRequest failures in dom/payments/test/test_block_none10s.html 2018-09-19 12:31:51 +03:00
Marcos Cáceres 9dd1b3aeae Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 08:41:53 +00:00
Ehsan Akhgari 5d9d4af0cd Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-18 00:58:52 -04:00
Ehsan Akhgari 9aa38967b7 Bug 1491574 - Part 1: Remove the XPCOM registration for nsProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5949
2018-09-18 00:33:59 -04:00
Coroiu Cristina 40028657f0 Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE
Backed out changeset 5390b485f7e4 (bug 1491574)
Backed out changeset 3d11b69de826 (bug 1491574)
Backed out changeset e7e8f3f70f8b (bug 1491574)
2018-09-18 07:10:20 +03:00
Ehsan Akhgari 9b9060a876 Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-17 22:05:34 -04:00
Ehsan Akhgari d6cfac82e5 Bug 1491574 - Part 1: Remove the XPCOM registration for nsProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5949
2018-09-17 21:39:54 -04:00
Eric Rahm 9f6d588b5d Bug 1491151 - Part 4: Convert atom table to use MRU cache. r=smaug
--HG--
extra : rebase_source : 7adb5dd49cf55543324c313229c406dba8a8535a
2018-09-12 17:51:53 -07:00
Eric Rahm b9e8fd399e Bug 1491151 - Part 1: Add MruCache. r=smaug,froydnj
This adds a most recently used cache that can be used as a quick lookup table
for frequently used entries.

--HG--
extra : rebase_source : 571c32f75e985e299113f73b959809d208aad5f3
2018-09-10 14:45:55 -07:00
Ehsan Akhgari d238ac27cc Bug 1469714 - Part 1: Add the allow-storage-access-by-user-activation iframe sandbox flag; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5810
2018-09-17 13:00:38 -04:00
Gurzau Raul 78e7d3e5c7 Backed out 13 changesets (bug 1469714, bug 1491061) for bustages at src/dom/base/nsDocument.cpp, failures at test_browserGlue_bookmarkshtml.js and browser_startup.js on a CLOSED TREE
Backed out changeset 494e23ba027e (bug 1491061)
Backed out changeset 43552fcae4a4 (bug 1491061)
Backed out changeset 0fb2ac9ad5ec (bug 1469714)
Backed out changeset 4a88ff107478 (bug 1469714)
Backed out changeset 158def1e0b8c (bug 1469714)
Backed out changeset 61dc8b46e7f6 (bug 1469714)
Backed out changeset 453370408672 (bug 1469714)
Backed out changeset ff443966e3d9 (bug 1469714)
Backed out changeset 88f414c8cecc (bug 1469714)
Backed out changeset 36e5c9e69f10 (bug 1469714)
Backed out changeset f90b4272f420 (bug 1469714)
Backed out changeset 4db771422e75 (bug 1469714)
Backed out changeset fe750643da13 (bug 1469714)
2018-09-17 18:06:50 +03:00
Ehsan Akhgari b334f85d93 Bug 1469714 - Part 1: Add the allow-storage-access-by-user-activation iframe sandbox flag; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5810
2018-09-17 10:04:21 -04:00
Gijs Kruitbosch 659898b84e Bug 1488822 - propagate allowScriptsToClose via the frameloader instead of relying on frame scripts, r=mconley,kmag,nika
Differential Revision: https://phabricator.services.mozilla.com/D5775

--HG--
extra : moz-landing-system : lando
2018-09-15 08:26:33 +00:00
Marcos Cáceres eb155e743a Bug 1474499 - Add support for onmerchantvalidation and MerchantValidationEvent. r=edenchuang,baku 2018-09-12 22:56:00 +03:00
Hiroyuki Ikezoe 17186e2c2f Bug 1483111 - Implement any-hover and any-pointer media queries features. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-08-17 20:29:37 +09:00
Hiroyuki Ikezoe ef03e2a299 Bug 1035774 - Add media feature keys for hover and pointer. r=heycam,emilio
Summary:
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer

In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.

Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-08-14 17:13:04 +09:00
arthur.iakab 620bc5019f Backed out changeset ebe2c08a2454 (bug 1474499) for failing web platform tests on ValidationEvent/constructor.https.html 2018-09-11 19:30:23 +03:00
Marcos Cáceres e4203c1813 Bug 1474499 - Add support for onmerchantvalidation and MerchantValidationEvent. r=edenchuang,baku
--HG--
extra : rebase_source : 5b5488fb1bb6c9f901a8c22c12aa635ebf8381c8
2018-09-11 06:00:00 +03:00
Henri Sivonen 39dc649092 Bug 1488697 - Make StringBuilder::ToString avoid repeated capacity and aliasing checks as well as terminator writes. r=smaug
* Avoid the string implementation's capacity checks, since we know they
   succeed.
 * Avoid the string implementation's aliasing checks, since we know there's no
   aliasing.
 * Avoid writing the zero terminator more than once or out of sequence.
 * Use u"" literals when appending literals to a UTF-16 string.
 * Write runs of non-escaped code units instead of writing code unit by code
   unit in order to benefit from SIMD (either via memcpy or
   ConvertLatin1toUTF16).

This results in a 13% execution time reduction on desktop Haswell i7 when
getting the innerHTML of the body of the Selectors spec. (The WebKit
optimization target from https://bugs.webkit.org/show_bug.cgi?id=81214 .)

MozReview-Commit-ID: LAg3gkGJnpQ

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

--HG--
extra : moz-landing-system : lando
2018-09-08 07:47:28 +00:00
Zibi Braniecki e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07:00
Paolo Amadini 5aaf848c8b Bug 1457218 - Part 3 - Remove the "menu-button" binding. r=surkov,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4531

--HG--
extra : rebase_source : 502aa0ff24d0e3d46ef60c7a14498e25c66d1c81
2018-08-29 14:04:25 +01:00
Margareta Eliza Balazs 2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Gerald Squelart bad49db9b0 Bug 1479996 - Combine nsTArray::IndexOf and element access into lambda-friendly functions - r=froydnj
In many places, nsTArray::IndexOf is followed by accessing that element
(hopefully with `Elements() + index`, which skips unnecessary bounds checks.)
But this pattern introduces operations that could be avoided:
- IndexOf converts the address of the found element into an index,
- The caller must test for a special `NoIndex` value,
- On success, accesses convert that index back into the original address.

This patch introduces new 'ApplyIf...' functions that combine all these
operations in a more efficient ensemble: If the sought element is found, it is
passed by reference to a given callable object (usually a lambda); if not
found, another callable is invoked.
Depending on what they need, the first callable may take one of these parameter
lists: (), (size_t), (maybe-const elem_type&), (size_t, maybe-const elem_type&).
On top of removing the pointer->index->pointer operations in most cases,
invoking callables directly from ApplyIf is safer, as the array is guaranteed to
be untouched at this time.
Also, being templates taking function objects, in most cases the compiler should
be able to inline and optimize the search and its callables' code.

This patch gives example uses in nsTArray::Contains, and in
FrameProperties::GetInternal, SetInternal.
And FrameProperties::Has now calls Contains, which is more efficient because
the former code would compute an index (or NoIndex), and then convert that index
to a bool; whereas the new code directly produces a bool from within the search
algorithm.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:04:09 +00:00
Nicholas Nethercote fe34f19459 Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium
The 'x' in the new name makes it clearer that it's infallible.

--HG--
extra : rebase_source : 51fd946c482befe8a8ca5bd88ecc967971f455da
2018-08-28 15:59:19 +10:00
Nicholas Nethercote 2fcd08a173 Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium
The 'x' prefix makes it clearer that these are infallible.

A couple of nsJSID methods are now also infallible.

--HG--
extra : rebase_source : fcce44a00212d6d341afbf3827b31bd4f7355ad5
2018-08-28 15:58:54 +10:00
Nicholas Nethercote ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Kris Maglione 367cf770e4 Bug 1484373: Follow-up: Fix missed review comment. r=froydnj (implied)
--HG--
extra : rebase_source : 4a107432497e269e0c8e73924d33ca5477b057af
2018-08-24 22:31:10 -07:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Kris Maglione c943b2a5c4 Bug 1484496: Part 4a - Add JS iterator support to nsISimpleEnumerator. r=mccr8
This patch adds simple stubs to convert between the nsISimpleEnumerator
iteration protocol and the JS iteration protocol.

Each iterable object is required to have an @@iterator method which returns an
object implementing the iterator protocol. The later objects, by convention,
also have such a method which returns the object itself.

This patch adds both a @@iterator() and entries() methods to
nsISimpleEnumerator. The former returns an iterator which returns plain
nsISupports objects. The latter accepts an IID and queries each element to
that IID before returning it. If any element fails to query, the error is
propagated to the caller.

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

--HG--
extra : rebase_source : 340eb43a1c5e6d7ae69fa8ee486d66d31d079b14
extra : histedit_source : f3efc6c265851a563968ee410e4626e0540f55c0
2018-08-18 16:02:49 -07:00
Kris Maglione 0425e42aa8 Bug 1484496: Part 3 - Fix nsISimpleEnumerator implementations with broken contracts. r=froydnj
The nsISimpleEnumerator contract specifies that GetNext() returns
NS_ERROR_FAILURE when iteration is complete. Several implementations, however,
either return NS_OK and a null result, or return some other error code, when
iteration is complete.

Since my initial implementation of the JS iteration stubs rely on the
contract-defined behavior of GetNext(), these need to be fixed before it can
land.

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

--HG--
extra : rebase_source : aab0395df52e18ccff5b0a2489a983013bf484b1
extra : histedit_source : a5644f0a88799b4463af9dd01dfec33b373b1f58
2018-08-18 18:28:10 -07:00
Kris Maglione 65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

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

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Kris Maglione 376fa824ca Bug 1484373: Part 3 - Add ranged iterator wrapper for nsISimpleEnumerator. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D3693

--HG--
extra : rebase_source : cbbdff7253ca244614cc151342e3d4fb9ebfdbb1
extra : histedit_source : f613ae6c6114e55c13231d56911657989d697c03
2018-08-17 19:36:18 -07:00
Dave Townsend 204fe23163 Bug 1484844: Make nsINIParser mutable. r=froydnj
In order to implement profile-per-install we need a mutable INI parser in early
startup. The current one is implemented in JavaScript and thus not available.
This makes the current read-only C++ INI parser mutable and removes the
JavaScript implementation.

It turns out that the two different implementations of nsIINIParserFactory and
nsIINIParser behaved slightly differently but only in ways that the single test
cared about so I've adjusted things a little to make it work.

The existing C++ implementation did not do validity checks on arguments, this
adds that making empty sections and values illegal.

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

--HG--
rename : xpcom/tests/unit/test_iniProcessor.js => xpcom/tests/unit/test_iniParser.js
extra : source : 524941c8ed0e048ee51be1bd11082b41428ef490
extra : amend_source : 2de6cef5be97448a41733bedda29d6af34aed27a
2017-10-12 14:20:57 -07:00
Emilio Cobos Álvarez accc448c34 Bug 1483823 - Deduplicate system metric atoms. r=xidorn
Now that :-moz-system-metric is gone, there's no real reason for the atoms to
be separate.

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

--HG--
extra : moz-landing-system : lando
2018-08-17 01:07:22 +00:00
Cameron McCormack 0e70842906 Bug 1483449 - Simplify nsStaticAtomUtils::Lookup. r=njn 2018-08-16 11:40:02 +10:00
Csoregi Natalia 22b0dc3451 Backed out changeset a91ccbe2b3fd (bug 1483449) for failures at nsStaticAtomUtils.h:25. CLOSED TREE 2018-08-16 05:11:46 +03:00
Cameron McCormack a4d0161e79 Bug 1483449 - Simplify nsStaticAtomUtils::Lookup. r=njn 2018-08-16 11:40:02 +10:00
Cameron McCormack be0a66bcfb Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack 426af33a36 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack b17e6b4468 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack 99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack 4a23b5ff06 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack 8ae48d7906 Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Cameron McCormack 1cbfafaeb7 Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack b7b0540cce Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack 0b89d2391b Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack ec18757d45 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack e816227f97 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack cc6c806369 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack caeb752d2f Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Cameron McCormack ae87156cab Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack ee27868fc6 Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Andrew Osmond 51d273388c Bug 1416328 - Part 2. Expose decoding attribute for img elements. r=bz,tnikkel
This adds support for HTMLImageElement's decoding attribute, as
described by:

https://github.com/whatwg/html/pull/3221
https://whatpr.org/html/3221/images.html#decoding-images

It also exposes the same attribute on SVGImageElement, just as Blink has
chosen to do so.
2018-08-08 07:56:01 -04:00
Nicholas Nethercote 097b276f5c Bug 1480660 - Remove ConstExprHash{UntilZero,String}(). r=froydnj
They were workarounds for bugs in GCC 4.9, which is no longer supported.

--HG--
extra : rebase_source : b793b4643e1e44199afdb8e8b35f930e02664be8
2018-08-03 14:47:41 +10:00
Nika Layzell 3869445efd Bug 1474739 - Part 3: Linting fixes on a CLOSED TREE, a=bustage 2018-08-01 18:23:21 -04:00
Nika Layzell d36f0538d8 Bug 1479484 - Part 3: Add perfecthash.py with codegen to xpcom/ds/tools, r=froydnj
Summary:
This is a streamlined version of perfecthash.py from xpcom/reflect/xptinfo.
There are a few major changes here:

Instead of providing '(key, value)' pairs to the constructor, callers provide a
list of 'entries'. An optional 'key' parameter allows overriding the function
used to get an entry's key. The default behaviour is as before, destructuring a
(key, value) tuple.

Keys can now be anything which supports the 'memoryview' protocol with 1-byte
elements, rather than being forced to be a 'bytearray'. This allows passing in
types such as bytestrings.

A new 'cxx_codegen' method is now exposed which generates a series of
fully-contained C++ declarations to perform entry lookups. It is possible to
override many parts of this codegen to make it the best fit for your component.

PerfectHash remembers the 'key' function, meaning lookup methods automatically
verify a valid key was passed in, and return 'None' otherwise.

Depends On D2615

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

Differential Revision: https://phabricator.services.mozilla.com/D2616
2018-08-01 17:54:42 -04:00
Nika Layzell 7a9f60fafb Bug 1479484 - Part 1: Add make_dafsa.py to the virtualenv's python path, r=froydnj
Summary:
The plan is to also expose perfecthash.py from this module on the python path.
This also allows us to stop using explicit module loading to load make_dafsa.py.

make_dafsa.py was moved into tools/ to avoid any extra python files from
accidentally ending up on the python path.

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

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


--HG--
rename : xpcom/ds/make_dafsa.py => xpcom/ds/tools/make_dafsa.py
2018-08-01 17:54:41 -04:00
Nicholas Nethercote 234016c13e Bug 1477626 - Document some differences between mozilla::HashTable and PLDHashTable. r=Waldo
MozReview-Commit-ID: DB0KUy99DDM

--HG--
extra : rebase_source : 4d14c47c48cb821f6c69654c1c5d90c48f217e48
2018-07-26 20:15:55 +10:00
Nika Layzell cb71d3b003 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-31 17:53:03 -04:00
Nika Layzell da14f0e1df Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-31 17:52:59 -04:00
Nicholas Nethercote 0f205a7ce0 Bug 1477626 - Move ScrambleHashCode() from js/src/Utility.h to mfbt/HashFunctions.h. r=Waldo
And use it in PLDHashTable.cpp.

MozReview-Commit-ID: BqwEkE0p5AG

--HG--
extra : rebase_source : bd9118e24b82add6ad1fdcb067a5f25b25e90201
2018-07-26 18:52:47 +10:00
Nicholas Nethercote 25a1140207 Bug 1477626 - Introduce mozilla::HashNumber and use it in various places. r=Waldo
Currently we have three ways of representing hash values.

- uint32_t: used in HashFunctions.h.

- PLDHashNumber: defined in PLDHashTable.{h,cpp}.

- js::HashNumber: defined in js/public/Utility.h.

Functions that create hash values with functions from HashFunctions.h use a mix
of these three types. It's a bit of a mess.

This patch introduces mozilla::HashNumber, and redefines PLDHashNumber and
js::HashNumber as synonyms. It also changes HashFunctions.h to use
mozilla::HashNumber throughout instead of uint32_t.

This leaves plenty of places that still use uint32_t that should use
mozilla::HashNumber or one of its synonyms, but I didn't want to tackle that
now.

The patch also:

- Does similar things for the constants defining the number of bits in each
  hash number type.

- Moves js::HashNumber from Utility.h to HashTable.h, which is a better spot
  for it. (This required changing the signature of ScrambleHashCode(); that's
  ok, it'll get moved by the next patch anyway.)

MozReview-Commit-ID: EdoWlCm7OUC

--HG--
extra : rebase_source : 5b92c0c3560eb56850cd8832f8ee514d25e3c16f
2018-07-26 18:52:46 +10:00
Cosmin Sabou bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Nathan Froyd 017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Cosmin Sabou e748fd8968 Backed out 15 changesets (bug 1475409, bug 1461450, bug 1474369, bug 1471726) for causing rooting hazards and browser chrome failures. CLOSED TREE
Backed out changeset 7ce27aa3ce68 (bug 1474369)
Backed out changeset a8a4e2414daa (bug 1474369)
Backed out changeset 13c9626970e2 (bug 1474369)
Backed out changeset 9817819b7765 (bug 1475409)
Backed out changeset 39fcebfe6529 (bug 1475409)
Backed out changeset c19ca740d3d1 (bug 1475409)
Backed out changeset b26c90518fca (bug 1474369)
Backed out changeset cbdde0474521 (bug 1474369)
Backed out changeset ccea3049fe0f (bug 1474369)
Backed out changeset e9f6d2544a82 (bug 1474369)
Backed out changeset 99c4d07d4b88 (bug 1474369)
Backed out changeset c721ada8a6d6 (bug 1461450)
Backed out changeset 961379be0f5e (bug 1461450)
Backed out changeset cf2448b2635f (bug 1471726)
Backed out changeset 408961783c95 (bug 1471726)
2018-07-30 20:31:24 +03:00
Nika Layzell 28fd912fa1 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-30 11:31:29 -04:00
Nika Layzell a3c819960c Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-30 11:27:55 -04:00
Emilio Cobos Álvarez 3aaf4c171a Bug 1466614: Remove -moz-windows-theme. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2492

MozReview-Commit-ID: 70vOmLH7C27
2018-07-30 11:38:46 +02:00
Nika Layzell 7934975bff Bug 1478820 - Remove trailing 'o' in comment, r=me
Accidentally failed to commit this comment-only change.
2018-07-26 18:35:49 -04:00
Nika Layzell 8e44305af9 Bug 1478820 - Stop manually synchronizing VTYPE_ and nsXPTTypeTag, r=erahm
Reviewers: erahm!

Tags: #secure-revision

Bug #: 1478820

Differential Revision: https://phabricator.services.mozilla.com/D2449
2018-07-26 18:15:27 -04:00
Nathan Froyd cd8b60fc05 Bug 1478337 - avoid useless work in nsTArray::RemoveElement; r=erahm
When removing an element that exists in the array, there's no need to
perform extra bounds checks for actually removing the element; the
presence of the element guarantees that we have a valid index and a
valid range to remove.  So split RemoveElementsAt into a safe interface
and an unsafe interface, and let RemoveElement call the latter as an
internal optimization.  The same logic applies to RemoveElementSorted.

We call RemoveElement depressingly often, so this is a nice little win.
2018-07-26 09:37:48 -04:00