750361 Commits

Author SHA1 Message Date
Keefer Rourke
8103aca07d Bug 1649593: Use IOUtils instead of OS.File in ExtensionParent.jsm r=zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D87483
2021-03-23 22:59:32 +00:00
Harry Twyford
9333311aa6 Bug 1616700 - Part 3 - Update the placeholder string on the handoff input to read "Search with {engine} or enter address" r=fluent-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108266
2021-03-23 22:56:54 +00:00
Harry Twyford
e52efdbba9 Bug 1616700 - Part 2 - Apply a disabled appearance to the handed-off input rather than hiding it. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108826
2021-03-23 22:56:54 +00:00
Harry Twyford
35161ada24 Bug 1616700 - Part 1 - Use default address bar search mode for new tab search handoff r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108825
2021-03-23 22:56:54 +00:00
Sam Foster
c5f8501ed8 Bug 1699858 - Avoid using the toolkit/global icons which are about to change for proton. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D109186
2021-03-23 22:48:24 +00:00
Timothy Nikkel
52941487d7 Bug 1700250. Dump the uri when we are dumping the display list. r=mstange,miko
Differential Revision: https://phabricator.services.mozilla.com/D109450
2021-03-23 22:43:12 +00:00
Emilio Cobos Álvarez
966d0f4dfc Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-23 22:31:08 +00:00
Emilio Cobos Álvarez
0bdcb35e12 Bug 1700472 - Add braces to SetPaginatedScrolling. r=dholbert
Drive-by fixup while I was reading related code.

Depends on D109545

Differential Revision: https://phabricator.services.mozilla.com/D109546
2021-03-23 22:31:07 +00:00
Emilio Cobos Álvarez
96b57ed405 Bug 1700472 - Minor cleanup in ConstructDocElementFrame. r=dholbert
No behavior change, just compute the different things we need upfront.
At first I was going to use this in the following patch but it ended up
not being needed.

Differential Revision: https://phabricator.services.mozilla.com/D109545
2021-03-23 22:31:07 +00:00
Butkovits Atila
3361c11f7d Backed out 7 changesets (bug 1220696) for causing build bustages. CLOSED TREE
Backed out changeset 1ad2d5c0f253 (bug 1220696)
Backed out changeset 5e2f62a11d95 (bug 1220696)
Backed out changeset 07012ed7a30e (bug 1220696)
Backed out changeset a4e90de9355d (bug 1220696)
Backed out changeset 63ec6c3d05fd (bug 1220696)
Backed out changeset f165f45f8e1a (bug 1220696)
Backed out changeset ade95bf58db4 (bug 1220696)
2021-03-24 01:34:56 +02:00
Glenn Watson
fe7eef8441 Bug 1699603 - Switch dirty region tracking from bitmask to rects. r=gfx-reviewers,nical
Previously, we used a bitmask stored in the primitive visibility
state to determine which alpha batchers a primitive should be
added to, based on dirty regions.

The problem with this is that we had a limited number of bits that
could store visibility. If we overflowed that, all primitives that
touched any dirty rect would get added to the final bit group. This
was a performance cost in this edge case, but didn't affect the
correctness of rendering.

However, in future we'll have alpha tiles behind and in front of
compositor surfaces, if the compositor surface itself is not
opaque. This means we'll have more tiles that we need to add
prims to, and we must ensure the dirty rect tracking only adds
prims to tiles that the prim definitely belongs to.

This patch removes the bitmask, and instead stores a rect that
the prim occupies, which is intersected with the dirty rect
for the specific alpha batcher. No extra space in consumed in
the visibility state enum, as there was already padding in the
Detailed enum kind. There is a slight extra cost in terms of
the comparison for dirty primitives, but this is mitigated by
the ability to early out during Coarse -> Detailed prim visibility.

Long term, we want to change how tiles store this information so
that an index buffer is stored of dirty prims, negating the need
to walk the entire picture tree during batching.

Differential Revision: https://phabricator.services.mozilla.com/D109023
2021-03-23 20:24:43 +00:00
Emilio Cobos Álvarez
6ed1fcf4d1 Bug 1700478 - Fix geometry-properties-in-css.html by restoring a call to IsSVGTransformed.
And also fix the relevant comment.

MANUAL PUSH: Orange in a CLOSED TREE
2021-03-24 00:17:45 +01:00
Butkovits Atila
fc5147c0c6 Backed out changeset 4d707f323366 (bug 1699603) for causing build bustages. CLOSED TREE 2021-03-24 01:12:43 +02:00
Masayuki Nakano
5b18850f6e Bug 1686662 - Stop starting autoscroll if requested browsing context is not in foreground tab anymore r=smaug,Gijs
`AutoScrollParent` starts autoscroll even if the requested tab has already
been in background tab.  In this case, it does not make sense to start
autoscrolling in new foreground window since it may not be scrollable.

Additionally, our `mousedown` event default action activates the DOM window,
but in the DuckDuckGo's case, focus shouldn't be backed to the clicked tab.

Differential Revision: https://phabricator.services.mozilla.com/D106590
2021-03-23 22:21:29 +00:00
Emilio Cobos Álvarez
5a6212f1ce Bug 1700478 - Make IsTransformed cheaper for non-transformed frames. r=longsonr
Remove a bit of the aStyleDisplay gunk that shouldn't be needed because
of two reasons:

 * Stylo is faster / has the style display one pointer-chase away, as
   opposed to the old style system.

 * We now check the MAY_BE_TRANSFORMED bit first now, and we deal with
   SVG-transformed frames, so for non-transformed frames IsTransformed
   should just be a bit-check now.

Differential Revision: https://phabricator.services.mozilla.com/D109511
2021-03-23 22:01:25 +00:00
Dave Hunt
32520f2b09 Bug 1700333 - Remove facebook-redesign from browsertime desktop page load suite r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D109535
2021-03-23 21:55:09 +00:00
Iain Ireland
f3124f58cc Bug 1699851: Inline ArrayIteratorNext r=jandem
We improve by ~40% on a microbenchmark because we can scalar-replace the result object.

Differential Revision: https://phabricator.services.mozilla.com/D109166
2021-03-23 21:18:32 +00:00
Iain Ireland
04f27e8e84 Bug 1699851: Improve scalar replacement of objects r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D109165
2021-03-23 21:18:32 +00:00
Iain Ireland
8ca301f628 Bug 1697696: Support pruning with OSR r=nbp
The change in `guessPhiType` is necessary because after pruning the path from the entry block to the OSR preheader, phis in the preheader only have one operand and can be simplified by phi elimination, making it possible for a phi elsewhere in the CFG to have two distinct OsrValues as its operands.

The alternative to this patch and the previous one is to add code in PruneUnreachableBlocks to bail out of pruning if the non-OSR predecessor of the OSR preheader is unreachable. This lets us do branch pruning in a subset of OSR compilations. (Top-level scripts are the most likely to be unprunable.)

Differential Revision: https://phabricator.services.mozilla.com/D108898
2021-03-23 21:18:31 +00:00
Iain Ireland
405985586c Bug 1697696: Add MBasicBlock::NewFakeLoopPredecessor r=nbp
In OSR compilations, if branch pruning eliminates the path from the entry block to the OSR preheader block, we can end up with loop headers with a backedge but no other predecessors. This breaks our dominator tree implementation. (Specifically, we crash in `IntersectDominators` with the header as `block1` and the OSR entry as `block2`.)

GVN solves this problem by adding fake unreachable predecessors to loop headers. This patch factors out the GVN code so that the next patch can use it to support branch pruning with OSR.

In the existing implementation, we create zero-input phis to use as inputs for any phis in the loop header. The zero-input phis were a problem for branch pruning, which runs before phi specialization, so I replaced them with MUnreachableResults. To avoid problems during lowering, I added a simple pass that removes the fake blocks after they are no longer needed.

(This removes one of the cases where visitBlock can visit an unreachable block; I verified that the no-GVN case is still possible and updated the assertions.)

Differential Revision: https://phabricator.services.mozilla.com/D108897
2021-03-23 21:18:31 +00:00
Iain Ireland
a07253a821 Bug 1697696: Refactor FlagAllOperandsAsHavingRemovedUses r=nbp
When we prune unreachable code, we mark the operands of removed instructions to ensure that they can be recovered if we bail out. The previous implementation of branch pruning always eliminated entire blocks. For blocks that always bail out, the new approach will only remove the instructions after the first MBail. We can therefore be a bit more precise about which operands we flag as having removed uses.

Differential Revision: https://phabricator.services.mozilla.com/D108896
2021-03-23 21:18:31 +00:00
Iain Ireland
b9540969f5 Bug 1697696: Prune branches based on unconditional bailouts r=nbp
We mark blocks as bailout blocks in WarpBuilder when we add an unconditional bailout. In branch pruning, we remove all the unreachable instructions (everything in a basic block after a bail), and remove any unreachable blocks.

I used a worklist approach to marking blocks instead of ReversePostOrderIterator because it gives us a more precise result for the reachability of a block header in the presence of OSR.

`optimized-out-03.js` was fragile and depended on compiling at exactly the right time. The new version should be a little more robust.

The TODO about over-marking is addressed in the next patch. The TODO about supporting OSR is addressed in the two patches after that.

Differential Revision: https://phabricator.services.mozilla.com/D108895
2021-03-23 21:18:30 +00:00
Iain Ireland
ad0cfe3b99 Bug 1697696: Remove dead branch-pruning code r=nbp
We don't use code coverage hitcounts for PGO in Warp, so HitState is always NotDefined.

Drive-by: Removing `JSScript::incHitCount`. Its only caller was removed in part 9 of bug 1682767.

Differential Revision: https://phabricator.services.mozilla.com/D108894
2021-03-23 21:18:30 +00:00
Mike Conley
07732430d8 Bug 1698981 - Show focus rings for panel footer buttons, both normal and menulike. r=Itiel,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109390
2021-03-23 20:59:36 +00:00
Mike Conley
1d7883aaba Bug 1699528 - Restyle password panels for Proton. r=sfoster,Itiel
This restyling mainly focuses on the text inputs, but also adjusts some
margins so that they apply more consistently between permission panels
and the password panel.

Differential Revision: https://phabricator.services.mozilla.com/D109105
2021-03-23 20:51:31 +00:00
Molly Howell
7165450449 Bug 1698436 - Keep overflow/customize menu items aligned. r=desktop-theme-reviewers,harry
This also fixes an issue with block margins that I noticed while developing
this patch, namely that the Profiler menu item was a few pixels too short
in addition to being offset to the right.

Differential Revision: https://phabricator.services.mozilla.com/D109453
2021-03-23 20:50:18 +00:00
Glenn Watson
caab38f422 Bug 1699603 - Switch dirty region tracking from bitmask to rects. r=gfx-reviewers,nical
Previously, we used a bitmask stored in the primitive visibility
state to determine which alpha batchers a primitive should be
added to, based on dirty regions.

The problem with this is that we had a limited number of bits that
could store visibility. If we overflowed that, all primitives that
touched any dirty rect would get added to the final bit group. This
was a performance cost in this edge case, but didn't affect the
correctness of rendering.

However, in future we'll have alpha tiles behind and in front of
compositor surfaces, if the compositor surface itself is not
opaque. This means we'll have more tiles that we need to add
prims to, and we must ensure the dirty rect tracking only adds
prims to tiles that the prim definitely belongs to.

This patch removes the bitmask, and instead stores a rect that
the prim occupies, which is intersected with the dirty rect
for the specific alpha batcher. No extra space in consumed in
the visibility state enum, as there was already padding in the
Detailed enum kind. There is a slight extra cost in terms of
the comparison for dirty primitives, but this is mitigated by
the ability to early out during Coarse -> Detailed prim visibility.

Long term, we want to change how tiles store this information so
that an index buffer is stored of dirty prims, negating the need
to walk the entire picture tree during batching.

Differential Revision: https://phabricator.services.mozilla.com/D109023
2021-03-23 20:24:43 +00:00
Tim Giles
20c7eb2867 Bug 1699705 - Allow autocomplete to use related realm credentials. r=sfoster,leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D91205
2021-03-23 20:21:13 +00:00
alwu
3f5687ca08 Bug 1301409 - re-enable mediasource-activesourcebuffers.html. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D109522
2021-03-23 20:17:27 +00:00
Scott
1e202523c4 Bug 1693376 - Move save to Pocket to the toolbar. r=Gijs,fluent-reviewers,gvn,flod
Differential Revision: https://phabricator.services.mozilla.com/D107744
2021-03-23 20:06:03 +00:00
Jon Bauman
4cd2d76c71 Bug 1694517 - Update libdav1d to 6c6d25d3 for Firefox 89. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D109456
2021-03-23 20:02:59 +00:00
Tim Giles
e8451cde7f Bug 1700201 - Fix branding on csv detail import report page. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D109502
2021-03-23 20:00:22 +00:00
Swapnik Katkoori
9e2f72d5ac Bug 1697616 - Hide toggle when video duration is NaN. r=mtigley,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D108241
2021-03-23 19:39:13 +00:00
Mike Conley
15246d9023 Bug 1697533 - Update the organization of the Bookmarks toolbar menu popup, and change style for Proton. r=mak,harry,desktop-theme-reviewers
Given the time constraints, and how fiddly this menupopup is (it's a menupopup
masquerading as a panel), I opted to not try to fix bug 985024. Instead, I've
applied the Proton styles as best I can given what I know about the styles
applied for the other menus.

Differential Revision: https://phabricator.services.mozilla.com/D109151
2021-03-23 19:35:32 +00:00
Masayuki Nakano
9892a73421 Bug 1220696 - part 6: Support insertLineBreak and insertParagraphSeparator commands in <textarea> r=smaug
Those command handlers just check whether the given editor is an `HTMLEditor`
or not.  Therefore, we should make them check whether the given editor is
a single line editor or not instead.

Differential Revision: https://phabricator.services.mozilla.com/D108572
2021-03-23 19:29:23 +00:00
Masayuki Nakano
843cdb6b35 Bug 1220696 - part 5: Support "contentReadOnly" and "getHTML" commands in <input> and <textarea> r=smaug
Although these commands supported supported only by Gecko, we shouldn't stop
supporting them unless we know the usage in the wild.  Therefore, this patch
adds the handling code for `TextEditor` too.

Differential Revision: https://phabricator.services.mozilla.com/D108571
2021-03-23 19:29:23 +00:00
Masayuki Nakano
4bce87d3e4 Bug 1220696 - part 4: Make Document consider whether the target is editable or not-editable with target editor r=smaug
Currently, `Document` checks it only with whether the document is editable
or not.  Only with this check, `execCommand` and the other related methods
work only when there is `contenteditable`.

Therefore, this patch makes it to check whether the target is editable or not
with target editor.

Differential Revision: https://phabricator.services.mozilla.com/D108570
2021-03-23 19:29:22 +00:00
Masayuki Nakano
fc94975380 Bug 1220696 - part 3: Make AutoEditorCommandTarget consider command handling editor with command and focused TextEditor or HTMLEditor r=smaug
For making `execCommand` and related methods with `<input>` and `<textarea>`
even if they are in `contenteditable` and focused, command should be handled
in active editor (focused editor if in foreground window and tab).

However, some commands should be handled by `HTMLEditor` even if an `TextEditor`
has focus.  Therefore, this patch adds new enum class which have 3 state into
`InternalCommandData` and makes `AutoEditorCommandTarget` consider it with the
enum class.

Note that the new failures about `contentReadOnly` command will be fixed by
a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D108569
2021-03-23 19:29:22 +00:00
Masayuki Nakano
79e9ddf2f5 Bug 1220696 - part 2: Make related methods of Document::ExecCommand use AutoEditorCommandTarget r=smaug
This will guarantee that when `<input>` or `<textarea>` is in `contenteditable`,
`execCommand` and the other related methods work with same command class
instance and same command context (in this case, it's editor instance).

Differential Revision: https://phabricator.services.mozilla.com/D108568
2021-03-23 19:29:21 +00:00
Masayuki Nakano
7c376d3a5d Bug 1220696 - part 1: Split off the code considering EditorCommand in Document::ExecCommand r=smaug
Editor command should be handled in same command table between `ExecCommand`
and the other related methods.  However, currently, only `ExecCommand` does
optimized things.  For using same logic in the other methods, the code should
be in an independent stack class.

Differential Revision: https://phabricator.services.mozilla.com/D108567
2021-03-23 19:29:21 +00:00
Masayuki Nakano
4a5ceb1077 Bug 1220696 - part 0: Update exec-command-with-text-editor.tentative.html for testing the following patches more r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108566
2021-03-23 19:29:20 +00:00
Emilio Cobos Álvarez
2366c509a8 WIP: Bug 1700132 - Annotate an intermittent test failure in forms/input/number/focus-handling.html.
This is a real issue, but realistically we're probably not going to dig
a lot into it, and it wasn't really caused by the regressing bug in any
meaningful way.

Differential Revision: https://phabricator.services.mozilla.com/D109532
2021-03-23 19:27:51 +00:00
Asif Youssuff
cfed153db9 Bug 1700001 - Added quit option for appmenu in Linux r=flod
Differential Revision: https://phabricator.services.mozilla.com/D109455
2021-03-23 19:25:52 +00:00
Masayuki Nakano
b4094e2c64 Bug 1528289 - part 4: Prevent click event if APZC cancels autoscroll synchronously r=botond
The automated tests become orange only in macOS and 32bit Windows builds.  It
fails when left mouse button down is synthesized in the autoscroller (a XUL
`<panel>` element).  Although I'm not sure why that depends on the platform,
APZ cancels active autoscrolling before dispatching `mousedown` event.
Therefore, `AutoScrollParent` nor `AutoScrollChild` cannot block the following
click event.

Therefore, this patch adds new field into `APZEventResult` and set it to `true`
when APZ runs `autoscroll` but canceled by a mouse input.  Then, `nsBaseWidget`
can prevent following click event of `eMouseDown` and `eMouseUp` events as
expected before dispatching them into the DOM tree.  (FYI: Preventing click
event of either `eMouseDown` or `eMouseUp` can prevent the following `click`
event, etc.)

Differential Revision: https://phabricator.services.mozilla.com/D107325
2021-03-23 19:22:49 +00:00
Masayuki Nakano
95157ad499 Bug 1528289 - part 3: Make AutoScrollChild check this._scrollable whether the autoscroller is open or closed r=Gijs
I was confused by the old flag `this._ignoreMouseEvents`.  It's now set to
`true` by `startAutoscroll`, but `stopScroll` does not set it to `false`.
Instead, `this._scrollable` is available for this purpose.

Then, the test does not pass only on 32bit Windows and macOS.  The failure is,
when clicking on left mouse button, `click` event is fired in the content.
The difference from the other platforms, the click is handled by APZ on them.
Therefore, there is no chance to consume click event in `AutoScrollParent`,
`AutoScrollChild` nor `browser-custom-element`.

Differential Revision: https://phabricator.services.mozilla.com/D107324
2021-03-23 19:22:49 +00:00
Masayuki Nakano
7653ddaefd Bug 1528289 - part 2: Dispatch same events on the web contents when autoscroll is canceled with a click r=Gijs,edgar
Chrome behaves like this:

1. When user starts autoscroll with a middle click, `mousedown` and `mouseup`
   are fired, but `auxclick` nor `paste` event is not fired.
2. When user ends autoscroll with a left click, only `mouseup` event is fired.
   I.e, `mousedown` nor `click` event is not fired.
3. When user ends autoscroll with a middle click, only `mouseup` event is fired.
   I.e., `mousedown`, `auxclick` nor `paste` events is not fired.
4. When user ends autoscroll with a right click, `mouseup` and `contextmenu`
   events are fired, but `mousedown` and `auxclick` events are not fired.

This patch emulates these Chrome's behavior as far as possible.  However,
unfortunately, we cannot do exactly same behavior without some big patches
because each widget (`nsWindow` or `nsChildView`) discards a mouse event
which rolled up a widget before dispatching it into the DOM.  Therefore,
for now, this patch does not fix the following issues:

1. `mousedown` event is not fired in content when clicking outside the
   autoscroller to close it except when pressing the secondary button or on any
   buttons on Linux.
2. `mouseup` event is not fired in content when clicking outside the
   autoscroller to close it except when pressing the primary button macOS.
3. `click` event and `auxclick` events are fired when clicking outside the
   autoscroller with the secondary button.

So, the middle button `click`/`auxclick` events and `paste` event which is
reported to the bug won't be fired with this patch.  I'll file follow up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D104652
2021-03-23 19:22:48 +00:00
Masayuki Nakano
2ad57f8fae Bug 1528289 - part 1: Move selection at middle button down rather than middle button up r=edgar
Chrome and Safari move selection at middle button down and does not modify the
range at middle button up.  However, they handle middle button down with
`Shift` key is "continue selection".  So, we should handle selection in
nsIFrame when `mousedown` event for middle mouse button is fired, but ignore
multiple selection, drag and drop and maintaining selection for aligning the
behavior to the other browsers.

This patch splits `nsIFrame::HandlePress()` and calls new method which
moves selection from `nsIFrame::HandleEvent()` when middle button is pressed.
(Note that this patch does not check whether middle click paste is enabled
because Chrome moves selection even on Windows which Chrome always disable
middle click paste on.)

With this change, "paste" event target is changed.  Previously, we used target
of the preceding `mouseup` event, but we start to use the target of the
preceding `mousedown` event.

Note that even with this patch, we still behave differently from Chrome even
in the following cases:
- middle mouse button down in selected range, we collapse it, but Chrome keeps
  the selection.
- middle mouse button click in selected range, we dispatch "paste" event, but
  Chrome collapse selection and not dispatch "paste" event.
- middle mouse button down in selected range and up in different element,
  Chrome does not modify the range nor dispatch "paste" event.
- Shift + middle mouse button in editable `<table>` works as non-editable
  in Chrome, but our editor handles it with special path.  Therefore, we
  don't modify the range but dispatch "paste" event in the selected range.

Changing them requires bigger change and probably requires some other features'
behavior changes.  Therefore, we shouldn't touch these issues until they are
actually reported as web-compat issues.

Differential Revision: https://phabricator.services.mozilla.com/D103997
2021-03-23 19:22:48 +00:00
Sebastian Hengst
a2f8d0f50b Bug 1699812 - set getsubstringlength-emoji-ligatures.html as failing on Android with Release and Beta r=emilio DONTBUILD
Test got added in bug 1697762 but build didn't get changed. Issue is pending
further investigation.

Differential Revision: https://phabricator.services.mozilla.com/D109341
2021-03-23 19:22:46 +00:00
Hubert Boma Manilla
af3289f596 Bug 1666386 - [devtools] Find blocked request using url name fixes intermittent r=nchevobbe
The test previously depended on the position of the blocked request
in the request list view, This causes the test to fail intermittently
when the list is out of order.

This fix instead finds the request using the name in the url which is
more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D109497
2021-03-23 19:21:21 +00:00
Masayuki Nakano
b21e72004b Bug 1693049 - Add a crashtest (the bug itself was fixed in bug 1669342) r=mbrodesser
Differential Revision: https://phabricator.services.mozilla.com/D109034
2021-03-23 19:20:59 +00:00