Commit Graph

643592 Commits

Author SHA1 Message Date
Masayuki Nakano
05ac721436 Bug 1533293 - part 4: Make Selection::SetStartAndEndInternal() select frames by itself r=smaug
When adding an range via `Selection::AddItem()` and only when it's caused by
user's operation, the range may be split at non-selectable content.  This is
done in `nsRange::ExcludeNonSelectableNodes()` but it modifies the given range
as the first range.  Then, [`Selection::AddRangeInternal()` calls
`Selection::SelectFrames()` with the range which may have been modified by
`nsRange::ExcludeNonSelectableNodes()`](https://searchfox.org/mozilla-central/rev/358f816f63da072145c593e9e2ac36b7250ecd25/dom/base/Selection.cpp#2030,2049).

Therefore, only the frames between first child of `<body>` element and
previous element of first non-selectable content are painted as selection
after user does "Select All".

[`Selection::Extend()` calls `Selection::SelectFrames()` by itself for all
existing ranges](https://searchfox.org/mozilla-central/rev/358f816f63da072145c593e9e2ac36b7250ecd25/dom/base/Selection.cpp#2718-2724).  Therefore, this patch creates new method and makes both
`Selection::Extend()` and `Selection::SetStartAndEndInternal()` call it only
when the result is not only one range.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:16:20 +00:00
Masayuki Nakano
0a753c3aac Bug 1533293 - part 3: Make editor and ContentEventHandler not use Selection::Extend() due to too slow r=m_kato
`Selection::Extend()` is too slow but editor and ContentEventHandler use it in
some places.  We should make them use `Selection::SetStartAndEndInLimiter()` or
`Selection::SetBaseAndExtentInLimiter()`.  The former is usable only when caller
guarantees the start point is prior to the end point in the DOM tree.
Otherwise, we need to use the latter even though it's slower than the former.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:09:47 +00:00
Masayuki Nakano
534fd23ca4 Bug 1533293 - part 2: Rewrite EditorBase::SelectEntireDocument() and its overrides r=m_kato
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow.  It should use `Selection::SetStartAndEndInLimiter()` instead.

Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element.  So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.

Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method.  So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:06:43 +00:00
Masayuki Nakano
e4ea50f3f8 Bug 1533293 - part 1: Create Selection::SetStartAndEnd() to set new range as far as faster r=smaug
`Selection::Extend()` is too slow because:
- it may create some `nsRange` instances.
- it users `nsContentUtils::ComparePoints()` multiple times.

Therefore, we can improve the performance if we can stop using it in some
places.  First, this patch creates `Selection::SetStartAndEnd()` and
`Selection::SetStartAndEndInLimiter()` for internal use.  They remove
current ranges, reuse `nsRange` instance as far as possible and add new
range which is set by their arguments.  Then, this patch makes
`Selection::SelectAllChildren()` stop using `Selection::Extend()`.  At this
time, this fixes a web-compat issue.  `Selection::Expand()` cannot cross the
selection limiter boundary when there is a limiter (e.g., when an editing host
has focus).  But we can now fix this with using the new internal API.

Note that methods in editor shouldn't move selection to outside of active
editing host.  Therefore, this patch adds `Selection::SetStartAndEndInLimiter()`
and `Selection::SetBaseAndExtentInLimiter()` for them.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:06:00 +00:00
Masayuki Nakano
6510d15c4b Bug 1536852 - Make nsRange::SetSelection() check mRegisteredCommonAncestor before calling UnregisterCommonAncestor() r=smaug
`nsRange::SetSelection()` may be called during unlinking.  Therefore,
`mRegisteredCommonAncestor` may have already been unlinked.  This patch
makes it check whether it's nullptr or not before using it to call
`UnregisterCommonAncestor()`.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:14:08 +00:00
Masayuki Nakano
e35cfd926c Bug 1536353 - part 3: Make nsIDOMWindowUtils.dispatchDOMEventViaPresShell() dispatch only trusted event r=smaug
In normal cases, `PresShell::EventHandler` won't receive untrusted event.
However, only `nsIDOMWindowUtils.dispatchDOMEventViaPresShell()` may send
untrusted event if its `aTrusted` is false.  Currently, this is not used by
chrome so that we don't need to keep supporting it for dispatching untrusted
events.

This patch removes `aTrusted` argument from it.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:10:22 +00:00
Masayuki Nakano
dbf37b7d62 Bug 1536353 - part 2: Merge PresShell::EventHandler::PrepareToDispatchEvent() and PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
`PresShell::EventHandler::PrepareToDispatchEvent()` checked whether the
given event is a trusted event or an untrusted event, but
`PresShell::EventHandler::PrepareToDispatchOntextMenuEvent()` didn't so.
However, now, both of them don't need to check it.  Therefore, we can merge
them.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:04:43 +00:00
Masayuki Nakano
f371fabc1b Bug 1536353 - part 1: Make PresShell::EventHandler stop checking WidgetEvent::IsTrusted() at runtime in release channel r=smaug
`PresShell::EventHandler` shouldn't be used to dispatch untrusted event.
However, it checks whether the given event is trusted or untrusted somewhere
and that makes the code harder to understand.  So, it should check each event
only with `MOZ_ASSERT()` or `MOZ_DIAGNOSTIC_ASSERT()` instead.  Then,
developers can trust the event is always a trusted event.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:02:06 +00:00
Andi-Bogdan Postelnicu
ff772f8795 Bug 1480480 - Explain why some clang-tidy checkers are not published. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D7170

--HG--
extra : moz-landing-system : lando
2019-03-26 10:04:58 +00:00
Alex Chronopoulos
dfc6cb0281 Bug 1537725 - Use the default stack alignment in windows x86 for libdav1d. r=TD-Linux
Differential Revision: https://phabricator.services.mozilla.com/D24785

--HG--
extra : moz-landing-system : lando
2019-03-26 09:45:21 +00:00
Csoregi Natalia
819dd52416 Backed out changeset abf6af5e36d6 (bug 1537725) for bustages on libdav1d/moz.build. CLOSED TREE 2019-03-26 11:32:42 +02:00
Alex Chronopoulos
9aff2faa39 Bug 1537725 - Use the default stack alignment in windows x86 for libdav1d. r=TD-Linux
Differential Revision: https://phabricator.services.mozilla.com/D24785

--HG--
extra : moz-landing-system : lando
2019-03-25 22:51:31 +00:00
Andrei Oprea
8975211e35 Bug 1505535 - Add tab usage probes for pinned tabs r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D24031

--HG--
extra : moz-landing-system : lando
2019-03-26 09:12:10 +00:00
Mark Banner
74d9178878 Bug 1538771 - Fix highlighting of matches within URLs in QuantumBar results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D24762

--HG--
extra : moz-landing-system : lando
2019-03-26 09:16:06 +00:00
Mark Banner
ce267bd0ae Bug 1538771 - Move trimURL to BrowserUtils.jsm so it can be more easily accessed in non-window contexts. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D24761

--HG--
extra : moz-landing-system : lando
2019-03-26 09:15:50 +00:00
Mark Banner
1a70ced2d9 Bug 1536776 - Fix display of percent-encoded URLs in QuantumBar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D24502

--HG--
extra : moz-landing-system : lando
2019-03-26 09:15:15 +00:00
Andreas Pehrson
e16275db35 Bug 1504336 - Avoid race in test_pc_simulcastOddResolution.html. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D24725

--HG--
extra : moz-landing-system : lando
2019-03-26 08:36:13 +00:00
Andy Wingo
baaa715e33 Bug 1538488 - Fix XPConnect/BigInt test when bigint is off r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D24667

--HG--
extra : moz-landing-system : lando
2019-03-26 07:17:47 +00:00
Dhruvi Butti
805db1b032 Bug 1512400 - Make console autocomplete optional. r=nchevobbe.
Add a preference to make the console input autocomplete automatic.
If set to false, the autocomplete popup will only appear on Ctrl+Space.
A test is added to ensure this works as expected.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 07:13:15 +00:00
Nico Grunbaum
f7e4ecddf4 Bug 1515716 - refactor the RTC RTP stats types to match spec r=jib,smaug
realigning the RTP stats types to match spec. This involves breaking out the remote dictionary types. This shouldn't create user space visible changes.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 06:06:36 +00:00
Matt Woodrow
3859e5d739 Bug 1535507 - Assume that we have an empty display list building override rect for frames that support it, even if an explicit one isn't present. r=miko
If the frame supports it (stacking context + containing block for fixed), and a descendant was
modified, we would have created an override dirty region with just the area of that descendant.
In the case where no descendants are modified, we should use an empty rect, rather than
the area inherited from our parent.

This fixes the case where we forcibly build position:fixed frames (since they might async
scroll differently to the rest of the page), but we only need to build the container item,
not the whole frame subtree within it.

Added a test that shows us building the non-intersecting position:fixed, but not items within it.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 02:14:50 +00:00
Matt Woodrow
bb2fb955d4 Bug 1535507 - Don't create new display items for InvalidateLayer, since only the Layer tree should need to change. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D23609

--HG--
extra : moz-landing-system : lando
2019-03-26 02:14:30 +00:00
Matt Woodrow
6dc498e40b Bug 1535507 - Don't force display item rebuilding for ActiveLayerTracker expiry, since we should only need to update the Layer tree. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D23608

--HG--
extra : moz-landing-system : lando
2019-03-26 02:14:13 +00:00
Oriol Brufau
43c358adc7 Bug 1538378 - Test that tabs.onCreated fires with active:true. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D24819

--HG--
extra : moz-landing-system : lando
2019-03-26 00:50:22 +00:00
Oriol Brufau
feb4f8fa49 Bug 1538378 - Back out bug 1529411. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D24818

--HG--
extra : moz-landing-system : lando
2019-03-26 02:40:18 +00:00
Nicholas Nethercote
653456467a Bug 1533240 - Replace DMD's custom TLS code with use of mozilla/ThreadLocal.h. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D22448

--HG--
extra : moz-landing-system : lando
2019-03-22 20:07:30 +00:00
Matt Woodrow
b99da239b5 Bug 1538003 - Disable some more intermittently failing webvtt tests. r=alwu"
Differential Revision: https://phabricator.services.mozilla.com/D24436

--HG--
extra : moz-landing-system : lando
2019-03-26 02:11:55 +00:00
Dennis Schubert
43366a5c39 Bug 1538966 - Use legacy keyCode and charCode for sites with known issues. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D24820

--HG--
extra : moz-landing-system : lando
2019-03-25 23:40:25 +00:00
Eric Rahm
3b644ff58e Bug 1538782 - Check for null when accessing tabModal. r=whimboo
The `tabModal` property getter can return null so we need to check it before accessing sub-properties.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 00:55:03 +00:00
Mike Hommey
13064496dc Bug 1539005 - Make mach bootstrap install the thumbv7neon-linux-androideabi target. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24825

--HG--
extra : moz-landing-system : lando
2019-03-26 00:19:20 +00:00
Mike Hommey
45d8ee6df1 Bug 1538419 - Add support for thumbv7neon to target-lexicon. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24596

--HG--
extra : moz-landing-system : lando
2019-03-26 03:12:56 +00:00
shindli
8af903f814 Backed out changeset 030cb27161ee (bug 1538786) for raptor failures in testing/raptor/test/test_manifest.py::test_get_raptor_test_list_firefox CLOSED TREE 2019-03-26 04:52:51 +02:00
shindli
a6cb898b72 Backed out changeset c0399366d123 (bug 1538419) for cargo library build bustages CLOSED TREE 2019-03-26 04:46:51 +02:00
James Teh
ef2bda893e Bug 1473234: make a11y listen to DOM events from iframes and shadow DOM. r=eeejay
1. Register with the root document window's parent target, since this receives events for iframes and shadow DOM. (The root document itself doesn't.)
2. Hold onto the target node when scheduling processing of the DOM event, as GetOriginalTarget returns null when we process shadow DOM events async.

Depends on D21349

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

--HG--
extra : moz-landing-system : lando
2019-03-25 05:04:36 +00:00
Karl Tomlinson
fd627991c1 Bug 1538640 wait for GraphRunner thread shutdown r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D24673

--HG--
extra : moz-landing-system : lando
2019-03-26 00:13:55 +00:00
Karl Tomlinson
faa25fa90f bug 1538630 Check a predicate when waiting on condition variables in GraphRunner r=pehrsons
so as to respond appropriately to spurious wakeups.

Checking the predicate before the first wait in Run() makes the mStarted
notification unnecessary.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 22:49:02 +00:00
Jeff Walden
83cdc4ca37 Bug 1526507 - Use std::exp2{,f}(n) instead of pow{,f}(2.0, n) in TestFloatingPoint.cpp to be (hopefully) more resilient against standard library imprecision in the latter. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D24403

--HG--
extra : moz-landing-system : lando
2019-03-25 17:54:25 +00:00
Julian Descottes
aa6b2752d1 Bug 1528781 - Hide tabs for This Firefox behind a preference;r=Ola,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D24378

--HG--
extra : moz-landing-system : lando
2019-03-25 16:09:57 +00:00
Mike Hommey
25dbad7cb2 Bug 1536307 - Bump libstdc++ requirement to 4.7. r=froydnj
Last time we updated the requirements was in bug 1278456, after we
switched to GTK+3.

While it might be worth checking what would be a reasonable requirement,
the immediate problem is that updating ANGLE hits a snag with a
libstdc++ 4.7 symbol, and the only main distro release that bumping to
that version would make us not support anymore is Ubuntu 12.04 LTS,
EOLed 2 years ago (April 2017).

Bumping to some even newer version would need more consideration.
Desupporting Ubuntu 12.04 LTS at this point is almost a no-brainer.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 12:40:25 +00:00
Sam Foster
b3f760835a Bug 1538285 - Make saved logins footer colors theme-friendly. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D24581

--HG--
extra : moz-landing-system : lando
2019-03-25 21:32:01 +00:00
Mike Hommey
198b466867 Bug 1538419 - Add support for thumbv7neon to target-lexicon. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24596

--HG--
extra : moz-landing-system : lando
2019-03-25 12:39:52 +00:00
Rob Wood
b6d015016c Bug 1538786 - Fix 'KeyError suites' when a tp6 page times out; r=davehunt
Differential Revision: https://phabricator.services.mozilla.com/D24746

--HG--
extra : moz-landing-system : lando
2019-03-25 19:30:38 +00:00
Makoto Kato
8986b3b0e4 Bug 1537885 - Use cmd_copy for copy command r=geckoview-reviewers,snorp
Although I change to use editor by previous fix of bug 676268, it is not
good for non-editable content. cmd_copy can support editable and non-editable.

GV already uses cmd_copy for this.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 16:34:07 +00:00
Alex Gaynor
8024e86d02 Bug 1538796 - Part 6 - remove unused IPDL OverlaySource union; r=kats
Depends on D24751

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

--HG--
extra : moz-landing-system : lando
2019-03-25 19:30:26 +00:00
Alex Gaynor
c711ab78bc Bug 1538796 - Part 5 - convert IPDL MaybeTexture union to use native Maybe syntax; r=mattwoodrow
Depends on D24750

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

--HG--
extra : moz-landing-system : lando
2019-03-25 18:56:30 +00:00
Alex Gaynor
05757c3863 Bug 1538796 - Part 4 - remove unused IPDL MaybeRegion union; r=kats
Depends on D24749

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

--HG--
extra : moz-landing-system : lando
2019-03-25 19:29:50 +00:00
Alex Gaynor
46926da383 Bug 1538796 - Part 3 - convert IPDL OptionalOpacity union to use native Maybe syntax; r=kats
Depends on D24748

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

--HG--
extra : moz-landing-system : lando
2019-03-25 19:29:46 +00:00
Alex Gaynor
91eb929e7b Bug 1538796 - Part 2 - remove unused IPDL OptionalOpacity union; r=kats
Depends on D24747

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

--HG--
extra : moz-landing-system : lando
2019-03-25 19:26:21 +00:00
Alex Gaynor
683876f917 Bug 1538796 - Part 1 - remove unused IPDL OptionalTransform union; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24747

--HG--
extra : moz-landing-system : lando
2019-03-25 19:26:01 +00:00
Marcos Cáceres
836cdca53a Bug 1538526 - Set BasicCardResponse defaults in IDL. r=baku
update to match spec. This is a refactor.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 23:40:23 +00:00