Commit Graph

3140 Commits

Author SHA1 Message Date
Gerald Squelart
a087b2df35 Bug 1663554 - Convert AUTO_PROFILER_TEXT_MARKER_... to new AUTO_PROFILER_MARKER_TEXT - r=gregtatum
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.

The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.

As a bonus, a specific start time can optionally be provided at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D89588
2020-09-11 00:42:51 +00:00
Marco Zehe
8e98d90958 Bug 1657576 - Expose the data-at-shortcutkeys attribute as an object attribute, r=Jamie
Currently used mostly by Twitter and Facebook to allow them to specify which virtual quick navigation keys assistive technologies should not use when in those web applications, but instead pass them through to the browser. JAWS is currently the only known assistive technology making use of this feature.

This works in Chrome and the new Edge, but not in Firefox, because JAWS stopped using ISimpleDOM in Firefox, which no longer gave them access to this attribute.

This bug is to allow exposure of the non-standardized data-at-shortcutkeys attribute value via a same-named IAccessible2 and ATK Object Attribute.

Differential Revision: https://phabricator.services.mozilla.com/D86181
2020-09-09 05:43:19 +00:00
Jeff Walden
b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +00:00
Sylvestre Ledru
c320561565 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D89392
2020-09-08 04:32:00 +00:00
Nathan Froyd
e199f12eb0 Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 17:42:56 +00:00
Razvan Maries
a842c56a74 Backed out changeset 52ecdec7fb73 (bug 1662707) for perma failures on nsTArray. CLOSED TREE 2020-09-02 18:14:25 +03:00
Nathan Froyd
1fdcd48ad2 Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 14:18:55 +00:00
Razvan Maries
e2dfb936e9 Backed out changeset 3c92e174f301 (bug 1662707) for build bustages on nsTArray.h. CLOSED TREE 2020-09-02 17:09:28 +03:00
Nathan Froyd
e4edab469b Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 12:13:23 +00:00
Emilio Cobos Álvarez
03baee9d8a Bug 1662478 - Rename ::file-chooser-button to ::file-selector-button, and enable it in all channels. r=jwatt
See https://github.com/w3c/csswg-drafts/issues/5049

Differential Revision: https://phabricator.services.mozilla.com/D88995
2020-09-01 22:58:10 +00:00
Nathan Froyd
b1cdc612da Bug 1243463 - make sEmptyTArrayHeader const; r=mccr8
We fixed what I think is the lone instance of writing into the (empty)
header in `SetLength` because it was causing TSan violations, so we should
be clear to make this `const`.  This change is not terribly effective on its
own (cf. the `const_cast` required to make this work at all), but in the
next patch, we can rig up `sEmptyTArrayHeader` to be surrounded with "guard
pages" and make rogue accesses off the array header a little more protected.

Differential Revision: https://phabricator.services.mozilla.com/D88657
2020-09-01 18:10:27 +00:00
Emilio Cobos Álvarez
063c081360 Bug 1660857 - Only apply grayscale filter for printing on print preview. r=jwatt,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D88065
2020-08-27 09:37:31 +00:00
Narcis Beleuzu
77bc01a5e1 Backed out 2 changesets (bug 1660857) for bc failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset 1378546cc0db (bug 1660857)
Backed out changeset 6c8985ac1d4c (bug 1660857)
2020-08-27 00:28:58 +03:00
Emilio Cobos Álvarez
0686e31ea8 Bug 1660857 - Only apply grayscale filter for printing on print preview. r=jwatt,dholbert
Depends on D88064

Differential Revision: https://phabricator.services.mozilla.com/D88065
2020-08-26 19:12:15 +00:00
Masatoshi Kimura
4215d524dc Bug 1658690 - Replace :-moz-native-anonymous-no-specificity with :where(:-moz-native-anonymous). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88255
2020-08-26 11:45:35 +00:00
Simon Giesecke
ed2f5ce857 Bug 1659955 - Fix leak counting in nsObserverList. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88110
2020-08-26 07:24:36 +00:00
Simon Giesecke
23c5914062 Bug 1659955 - Replace output parameter by return value in FillObserverArray and rename accordingly. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88109
2020-08-26 07:24:21 +00:00
Simon Giesecke
7c4dd7eeb0 Bug 1659955 - Avoid double copy of mObservers in FillObserverArray. r=gsvelto,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88108
2020-08-26 07:24:12 +00:00
Chris Fronk
3b7a1daba2 Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj
Adds a new specialization of nsDeque, nsRefPtrDeque for use with
reference counted pointers.

Differential Revision: https://phabricator.services.mozilla.com/D84766
2020-08-22 15:47:59 +00:00
alwu
2f509b85ff Bug 1656398 - part7 : add event handler 'onmetadatachange'. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86628
2020-08-18 06:55:47 +00:00
alwu
0b9d0ae82c Bug 1656398 - part5 : add event handler onplaybackstatechange. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86626
2020-08-18 06:32:59 +00:00
Zeke Medley
a591e69aa0 Bug 1591204 - Support forced colors media feature r=emilio
Enabled behind layout.css.forced-colors.enabled pending finalization
of the spec:

<https://drafts.csswg.org/mediaqueries-5/#forced-colors>

Differential Revision: https://phabricator.services.mozilla.com/D87147
2020-08-17 20:50:49 +00:00
Simon Giesecke
de65a11548 Bug 1656924 - Simplify nsTArray::Assign copying from another array. r=xpcom-reviewers,nika
nsTArray_Impl::Assign/operator= copying from another array cause code bloat by
using ReplaceElementsAtInternal without exploiting the knowledge that the whole
array is being replaced. Since for many instances of the class template, this
is the only ReplaceElementsAtInternal call being done, this unnecessary bloats
the generated code. Apart from that, it is suboptimal at runtime due to
unnecessary checks.

Furthermore, the implementation of ReplaceElementsAtInternal may unnecessarily
relocate the existing elements before destroying them if the storage needs to
be reallocated. While this could be optimized in ReplaceElementsAtInternal as
well, it is simpler to do so in the specialized AssignInternal that is now
introduced.

Differential Revision: https://phabricator.services.mozilla.com/D86723
2020-08-17 07:02:50 +00:00
Mihai Alexandru Michis
fb644eda26 Backed out changeset 5838f8b581ed (bug 1647536) for causing failures in browser_active_mediasession_among_tabs.js
CLOSED TREE
2020-08-14 19:42:51 +03:00
Chris Fronk
8770c8a332 Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj
Adds a new specialization of nsDeque, nsRefPtrDeque for use with
reference counted pointers.

Differential Revision: https://phabricator.services.mozilla.com/D84766
2020-08-14 15:19:48 +00:00
Emilio Cobos Álvarez
68dd457e8b Bug 1658903 - Remove nsPrintJob::TurnScriptingOn. r=jwatt
This code was there to prevent stuff like bug 424377, but nowadays clone
documents are data documents to begin with, so they can't load scripts.

Differential Revision: https://phabricator.services.mozilla.com/D86948
2020-08-13 12:22:56 +00:00
Simon Giesecke
785473cf85 Bug 1658701 - Stop writing to empty header in MoveConstructNonAutoArray. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D86804
2020-08-12 14:52:18 +00:00
Simon Giesecke
1a9da56b94 Bug 1653335 - Get rid of MakeSpan functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83818
2020-08-07 07:50:04 +00:00
Simon Giesecke
1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke
dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Nika Layzell
3759dc8c87 Bug 1589517 - Part 1: Add initialBrowsingContextGroupId attribute, r=farre
This attribute will subsume the existing sameProcessAsFrameLoader attribute. It
works by specifying the BrowsingContextGroup which the initial BrowsingContext
in a <browser> should be created within.

Due to bug 1652144, all documents within the same BrowsingContextGroup with the
same remote type will be loaded in the same process, meaning that specifying
both "initialBrowsingContextGroupId" and "remoteType" will cause the initial
about:blank document to be loaded in a specific content process.

Differential Revision: https://phabricator.services.mozilla.com/D85650
2020-08-06 17:01:06 +00:00
Emilio Cobos Álvarez
56efc18556 Bug 1657599 - Remove mozallowfullscreen code. r=smaug
I realized this was broken because feature policy was not accounting for
it (I fixed that in 79), but I _thought_ we weren't shipping
feature policy. It turns out we've been shipping it for a while (since 74),
so I'd rather remove support for it officially.

Differential Revision: https://phabricator.services.mozilla.com/D86191
2020-08-06 15:11:37 +00:00
Daniel Holbert
96d67c6eb3 Bug 1652278 part 2: Flesh out PrintedSheetFrame implementation so that it serves as the container for nsPageFrame. r=TYLin
This patch:
- Creates an anon-box pseudo-style for PrintedSheetFrame, in part so that it
  can co-opt the styles that we formerly gave to page-frames in ua.css, to draw
  the sheet of paper and the shadow in Print Preview.
- Adjusts nsCSSFrameConstructor to create a PrintedSheetFrame as the parent of
  nsPageFrame (inserting between it and its nsPageSequenceFrame container, in
  the frame tree).
- Fleshes out out a simple BuildDisplayList() implementation for
  PrintedSheetFrame (taking the responsibility for "paper"-drawing from
  nsPageFrame).
- Fleshes out a simple Reflow implementation for PrintedSheetFrame, just
  placing the child page (assuming there's only one for now) at the origin.
- Adjusts nsPageFrame and nsPageSequenceFrame to account for the fact that
  there's another layer between them now.

Note that PrintedSheetFrame needs to implement AppendDirectlyOwnedAnonBoxes()
(just as nsSimplePageSequence and nsPageFrame do), since it owns anonymous
nsPageFrame instances. This implementation only needs to append the first
child, as explained in the code-comment and in
https://bugzilla.mozilla.org/show_bug.cgi?id=1374761#c9 (and of course, for
now, PrintedSheetFrame only has one child at a time anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D83457
2020-08-05 03:28:32 +00:00
Simon Giesecke
96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Simon Giesecke
e22ce08596 Bug 1654991 - Simplify moving operator=, Assign and AppendElements. r=froydnj
The mentioned array operations were implemented using SwapElements, which is a
rather generic and therefore complex method (in the sense of template
instantiation and code generation), which doesn't make use of the knowledge that
the target array is empty and does not have any allocated heap storage.
Similar to the introduction of MoveConstructNonAutoArray, a new method, MoveInit,
is introduced that uses this knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D84806
2020-08-04 11:22:34 +00:00
Simon Giesecke
c082222bc8 Bug 1654991 - Provide and use special case of ShrinkCapacityToZero. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84805
2020-08-04 11:22:21 +00:00
Simon Giesecke
e0b51e4a84 Bug 1654991 - Simplify move constructor of nsTArray_Impl. r=froydnj
The move constructor of nsTArray_Impl (and therefore of nsTArray) was
implemented using SwapElements, which is a rather generic and therefore
complex method (in the sense of template instantiation and code generation),
which doesn't make use of the knowledge that the target array does not have
inline storage and is empty with 0 capacity. Therefore, a new specialized method,
MoveConstructNonAutoArray, is introduced that does use this knowledge. This
adds another method to maintain, but given that the move constructor is a
frequently used operation that is expected to have a small compile-time and
run-time cost (potentially used implicitly), this seems like a reasonable
trade-off.

Differential Revision: https://phabricator.services.mozilla.com/D84804
2020-08-04 11:22:09 +00:00
Noemi Erli
381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke
032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Simon Giesecke
3db287778f Bug 1654991 - Simplify moving operator=, Assign and AppendElements. r=froydnj
The mentioned array operations were implemented using SwapElements, which is a
rather generic and therefore complex method (in the sense of template
instantiation and code generation), which doesn't make use of the knowledge that
the target array is empty and does not have any allocated heap storage.
Similar to the introduction of MoveConstructNonAutoArray, a new method, MoveInit,
is introduced that uses this knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D84806
2020-08-03 15:14:42 +00:00
Simon Giesecke
45b8036770 Bug 1654991 - Provide and use special case of ShrinkCapacityToZero. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84805
2020-08-03 14:47:54 +00:00
Simon Giesecke
fcbd7f145f Bug 1654991 - Simplify move constructor of nsTArray_Impl. r=froydnj
The move constructor of nsTArray_Impl (and therefore of nsTArray) was
implemented using SwapElements, which is a rather generic and therefore
complex method (in the sense of template instantiation and code generation),
which doesn't make use of the knowledge that the target array does not have
inline storage and is empty with 0 capacity. Therefore, a new specialized method,
MoveConstructNonAutoArray, is introduced that does use this knowledge. This
adds another method to maintain, but given that the move constructor is a
frequently used operation that is expected to have a small compile-time and
run-time cost (potentially used implicitly), this seems like a reasonable
trade-off.

Differential Revision: https://phabricator.services.mozilla.com/D84804
2020-08-03 15:14:38 +00:00
alwu
4f35b1bd20 Bug 1654045 - part2 : add 'onactivated/ondeactivated' event handlers and 'isActive' on the media control webidl interface. r=chunmin
Add an event handler `onactivated/ondeactivated` and a readonly attribute `isActive` on the media control webidl interface, and they can be used in testing and the future plan of supporting media hub.

Differential Revision: https://phabricator.services.mozilla.com/D85229
2020-07-31 17:26:38 +00:00
Alexander Surkov
d5426056b8 Bug 1655722 - implement HTML:inert attribute r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85190
2020-07-29 17:24:04 +00:00
Sebastian Streich
9644a40740 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-07-29 11:50:09 +00:00
Tim Nguyen
f4e86cd6e4 Bug 558594 - Implement layout for <input type='search'>. r=emilio,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D56302
2020-07-27 12:09:40 +00:00
Honza Bambas
be7f10275a Bug 1628713 - Add Tokenizer::CheckPhrase to quickly check for compound strings, r=xpcom-reviewers,erahm
Differential Revision: https://phabricator.services.mozilla.com/D70373
2020-07-23 12:57:50 +00:00
Narcis Beleuzu
37cb83a398 Backed out 2 changesets (bug 921504) for wpt failures on inert-retargeting-iframe.tentative.html . CLOSED TREE
Backed out changeset 8b75cd744e80 (bug 921504)
Backed out changeset a56b2d354613 (bug 921504)
2020-07-22 23:53:55 +03:00
Alexander Surkov
1c382cad65 Bug 921504 - implement HTML:inert r=emilio,heycam
Differential Revision: https://phabricator.services.mozilla.com/D81701
2020-07-22 04:26:08 +00:00
Emilio Cobos Álvarez
5adefab54c Bug 1449401 - Remove moz-math-anonymous ua-only pseudo. r=heycam
We do not expose it nor ever style it. Just use the parent style all the
time. This avoids problematic style resolution calls during reflow.

Differential Revision: https://phabricator.services.mozilla.com/D84358
2020-07-21 22:35:46 +00:00