Commit Graph

669144 Commits

Author SHA1 Message Date
Masayuki Nakano
8438c04ae7 Bug 1574852 - part 42: Merge HTMLEditRules::WillMakeBasicBlock() into HTMLEditor::InsertBasicBlockWithTransaction() r=m_kato
`HTMLEditRules::WillMakeBasicBlock()` just calls
`HTMLEditor::FormatBlockContainer()` and it's called only for
`EditSubAction::eCreateOrRemoveBlock` and it's used only in
`HTMLEditor::InsertBasicBlockWithTransaction()`.  Therefore, we can replace
calling `HTMLEditRules::WillDoAction()` in it with what
`HTMLEditRules::WIllMakeBasicBlock()` does.

First, `HTMLEditRules::WillDoAction()` checks whether first selection range
is editable.  If it's not so, it returns `NS_OK` with setting `aCancel` to
`true`.  Therefore, this patch moves this part to
`HTMLEditor::CanHandleHTMLEditSubAction()` for making
`HTMLEditor::InsertBasicBlockWithTransaction()` can check it easier.

Next, `HTMLEditor::InsertBasicBlockWithTransaction()` does something if
`HTMLEditRules::WillDoAction()` returns as not handled nor canceled.
However, this special handling requires at least one selection range:
https://searchfox.org/mozilla-central/rev/597a69c70a5cce6f42f159eb54ad1ef6745f5432/editor/libeditor/HTMLEditor.cpp#2284-2288
Surprisingly, `handled` is set to `false` only when there is an error or
there is no selection range.  Therefore, this long block has already been
dead code so that we can remove this.  Removing this block causes that we
become not throwing exception when `Document.execCommand("formatblock")`
without selection ranges.  But this is better since Chrome does not throw
excption.

Finally, this patch renames some related methods:
- `HTMLEditor::FormatBlockContainer()` -> `HTMLEditor::FormatBlockContainerWithTransaction()`
- `HTMLEditor::InsertBasicBlockWithTransaction()` -> `HTMLEditor::FormatBlockContainerAsSubAction()`

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

--HG--
extra : moz-landing-system : lando
2019-09-02 06:08:43 +00:00
Masayuki Nakano
816dbbb57d Bug 1574852 - part 41: Move HTMLEditRules::InsertBRIfNeeded(nsINode&) to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D44178

--HG--
extra : moz-landing-system : lando
2019-09-02 03:17:14 +00:00
Masayuki Nakano
08108eda15 Bug 1574852 - part 40: Move HTMLEditRules::InsertPaddingBRElementForEmptyLastLineIfNeeded() to HTMLEditor r=m_kato
And this fixes the caller which has not guaranteed the lifetime of the
start container.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 03:16:26 +00:00
Masayuki Nakano
1155464d4c Bug 1574852 - part 39: Move HTMLEditRules::InsertBRIfNeeded() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D44174

--HG--
extra : moz-landing-system : lando
2019-09-02 01:47:14 +00:00
Dorel Luca
f8f63b82ff Merge mozilla-central to autoland 2019-09-03 07:07:09 +03:00
Dorel Luca
15fefbe415 Merge mozilla-inbound to mozilla-central. a=merge 2019-09-03 07:03:04 +03:00
Andrew Halberstadt
8c97bc7a17 Bug 1577908 - [mach] Disable suggested command execution until Python 3 migration is finished, r=glandium
The mach driver will now run all misspelled commands with Python 3. That means
we can't automatically execute the suggested command anymore, as it may need to
run against Python 2.

Ideally we could figure out a way to check the command against the 'mach'
whitelist, but until then, let's just disable automatic execution. Worst case
scenario we can turn it back on after the migration has finished.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 03:46:16 +00:00
Jean-Yves Avenard
1c657f7d19 Bug 1556489 - P25. Make nsIIdentChannel support conditional for nsBaseChannel. r=mayhemer
So that we can restrict QI(nsIIdentChannel) to nsIHttpChannel and DocumentChannelChild objects only.

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

MANUAL PUSH: multiple authors stack
2019-09-03 10:20:16 +10:00
Matt Woodrow
e93ff775a3 Bug 1556489 - P24. Update test to handle extra onStateChange events fired when using DocumentChannel. r=kmag
DocumentChannel issues an extra onStateChange at the start when it switched over to the real channel.

Differential Revision: https://phabricator.services.mozilla.com/D43203
2019-09-03 10:19:54 +10:00
Jean-Yves Avenard
5749840f21 Bug 1556489 - P23 - Only create new ClientSource objects in the content, but use the recreated info from redirects in the parent. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D42260
2019-09-03 10:19:53 +10:00
Jean-Yves Avenard
ff8e5e92fd Bug 1556489 - P22 - Manually add history entries for all DocumentChannel redirects, since these aren't exposed to the content process as channel redirects. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D42259
2019-09-03 10:19:53 +10:00
Matt Woodrow
4151ea2a94 Bug 1556489 - P21 - Cache the original referrer before url classification has been applied to send back to the content process, since the docshell expects to find the original. r=mayhemer,tnguyen
Differential Revision: https://phabricator.services.mozilla.com/D42258
2019-09-03 10:19:52 +10:00
Jean-Yves Avenard
9cdcb33634 Bug 1556489 - P20 - Remove unused method. r=mayhemer 2019-09-03 10:19:52 +10:00
Jean-Yves Avenard
d65c5e0309 Bug 1556489 - P19. Fix devtools stack traces. r=honza,ochameau
DevTools rely on events when a new HttpChannel is opened, it needs to know when a DocumentChannel is.

Differential Revision: https://phabricator.services.mozilla.com/D40975
2019-09-03 10:19:46 +10:00
Matt Woodrow
1b5f7c772a Bug 1556489 - P18. Add DocumentChannel and hook it up. r=nika,mayhemer
DocumentChannel acts as a replacement for HttpChannel where redirects are now entirely handled in the DocumentChannelParent. The ContentChild will receive the final nsIChannel once all redirects have been handled.

Differential Revision: https://phabricator.services.mozilla.com/D37490
2019-09-03 10:19:38 +10:00
Matt Woodrow
20e71d4c8a Bug 1556489 - P16. Add AddClientChannelHelperInParent helper method. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D40973
2019-09-03 10:19:37 +10:00
Jean-Yves Avenard
f0b40a38d7 Bug 1556489 - P15. Move methods into dedicated nsI* interface. r=mayhemer
This allows in the future for the nsHttpChannel to deal with things others than the HttpChannelParent.

Differential Revision: https://phabricator.services.mozilla.com/D40972
2019-09-03 10:19:37 +10:00
Matt Woodrow
8a54afbb4c Bug 1556489 - P14. No longer pass nsILoadInfo to TriggerCrossProcessRedirect. r=mayhemer
We can deduct it from the nsIChannel argument already. In the future, the httpParent may be either HttpChannelParent or DocumentChannelParent.

Differential Revision: https://phabricator.services.mozilla.com/D40971
2019-09-03 10:19:36 +10:00
Matt Woodrow
aa250bb0c7 Bug 1556489 - P13. Use LoadInfo redirect chain to determine when a channel has redirected and we should skip uri fixup. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40970
2019-09-03 10:19:36 +10:00
Matt Woodrow
747652aa04 Bug 1556489 - P12. Move code into static utility method. r=nika
We will need access to this method in a following change.

Differential Revision: https://phabricator.services.mozilla.com/D40969
2019-09-03 10:19:35 +10:00
Jean-Yves Avenard
b43fd91ea2 Bug 1556489 - P11. Add nIIdentChannel interface. r=mayhemer
The devtools listens to http-on-opening-request event which is expected to receive a nsIHttpChannel. However future changes will make it that it's not always a nsIHttpChannel that can fire such event.

As such we create an intermediary interface nsIIdentChannel and move the subset generating such event in nsIHttpChannel there.

Differential Revision: https://phabricator.services.mozilla.com/D40968
2019-09-03 10:19:34 +10:00
Matt Woodrow
b1aa62197e Bug 1556489 - P10. Pass PostData and Headers at DocShell creation time. r=nika,farre
Differential Revision: https://phabricator.services.mozilla.com/D40967
2019-09-03 10:19:27 +10:00
Matt Woodrow
c69966609c Bug 1556489 - P9. Make method static. r=nika,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40966
2019-09-03 10:19:20 +10:00
Matt Woodrow
e579f452c1 Bug 1556489 - P8. Add CSPService::ConsultCSPForRedirect. r=mayhemer,ckerschb
We extract the code from CSPService::AsyncOnChannelRedirect so that we can use it in a follow-up change.

Differential Revision: https://phabricator.services.mozilla.com/D40965
2019-09-03 10:19:12 +10:00
Matt Woodrow
a209298de2 Bug 1556489 - P7. Make LoadInfoArgsToLoadInfo works with LoadInfo class. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40964
2019-09-03 10:19:11 +10:00
Jean-Yves Avenard
0c52caf2b2 Bug 1556489 - P6. Simplify use of namespace. r=mayhemer
This is a cosmetic only change.

Differential Revision: https://phabricator.services.mozilla.com/D40963
2019-09-03 10:19:10 +10:00
Matt Woodrow
50cb731c68 Bug 1556489 - P5. Fix constness. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D40962
2019-09-03 10:19:09 +10:00
Jean-Yves Avenard
e76aa88e15 Bug 1556489 - P4. Add ability to set Document object on LoadInfo. r=mayhemer,ckerschb
This will be required to access the Performance object from future DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D41133
2019-09-03 10:18:58 +10:00
Jean-Yves Avenard
a23b70b74e Bug 1556489 - P3. Move logic on when to return the PerformanceStorage into nsILoadInfo. r=mayhemer
This more closely follow the code as earlier documented. To remove all ambiguities, the idl documentation was amended.

Differential Revision: https://phabricator.services.mozilla.com/D40961
2019-09-03 09:50:05 +10:00
Jean-Yves Avenard
de650bb217 Bug 1556489 - P2. Use ReplacementChannelConfig across HttpChannelParent and ContentChild. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40960
2019-09-03 09:49:46 +10:00
Jean-Yves Avenard
cc07990908 Bug 1556489 - P1. Introduce ReplacementChannelConfig. r=mayhemer
This class allows to encapsulate all the information required in order to create a new HttpChannel object following a redirect.

Differential Revision: https://phabricator.services.mozilla.com/D40959
2019-09-03 09:47:17 +10:00
Paul Bone
8a2eddc0bb Bug 1568740 - (part 8) Add a test r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39993

--HG--
extra : moz-landing-system : lando
2019-09-02 23:27:46 +00:00
Paul Bone
36d429dcf0 Bug 1568740 - (part 7) Factor out a common assertion r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39473

--HG--
extra : moz-landing-system : lando
2019-09-02 23:27:44 +00:00
Paul Bone
96ef0a81b6 Bug 1568740 - (part 6) Remove Nursery::chunkCountLimit() r=jonco
This method & the chunkCountLimit_ variable are unnecessary. The maximum
permitted nursery size is tracked in the GCSchedulingTunables class.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 23:27:42 +00:00
Paul Bone
922e62d24f Bug 1568740 - (part 5) Rename a variable r=jonco
The new variable, 'newMinNurseryBytes' is more in-line with the other
'newMaxNurseryBytes'.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 23:27:40 +00:00
Paul Bone
11f4038648 Bug 1568740 - (part 4) Use Nursery::roundSize() whenever setting the nursery size r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39283

--HG--
extra : moz-landing-system : lando
2019-09-02 23:26:02 +00:00
Paul Bone
7f2d26150f Bug 1568740 - (part 3) Nursery::roundSize should be a static member r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39282

--HG--
extra : moz-landing-system : lando
2019-09-02 23:25:50 +00:00
Paul Bone
d6c8514e15 Bug 1568740 - (part 2) Calculate the nursery's maximum size in bytes r=jonco
We used to calculate the nursery's maximum size in chunks, and track the
maximum number of chunks permitted. This could lead to some unexpected
behaviour with a larger nursery than requested. Calculating it in bytes is
simpler, avoids this problem, and is more in-line with other calculations.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 23:25:37 +00:00
Paul Bone
559cf58e44 Bug 1568740 - (part 1) Remove Nursery::exists r=nbp
The Nursery almost always exists. To remove the nursery's chunkCountLimit_
field we need to remove Nursery::exists(), so no-longer use it in the JIT.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 23:25:25 +00:00
Dorel Luca
0350d05627 Merge mozilla-inbound to mozilla-central. a=merge 2019-09-03 00:38:02 +03:00
Dorel Luca
e4301ca732 Merge autoland to mozilla-central. a=merge 2019-09-03 00:34:37 +03:00
Eric Rahm
c5497a628a Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 17:38:31 +00:00
Justin Wood
bc8f1f8edd Bug 1578263 - Use release-type in param eval rather than release-level. r=jlorenzo
Differential Revision: https://phabricator.services.mozilla.com/D44392

--HG--
extra : moz-landing-system : lando
2019-09-02 16:08:40 +00:00
Coroiu Cristina
7b22710544 Backed out changeset 6e0fb526633d (bug 1577916) for build bustage at gfx/layers/composite/TextRenderer.cpp on a CLOSED TREE 2019-09-02 20:15:28 +03:00
Eric Rahm
bb149919a3 Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 16:53:17 +00:00
Martin Stransky
85351067cf Bug 1548475 - [Wayland] Disable Flash on Wayland backend, r=glandium
Reviewers: jmathies

Reviewed By: jmathies

Bug #: 1548475

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

--HG--
extra : rebase_source : 8ad63589add41a921bec2834aa82bdabb039fcda
2019-09-02 19:05:45 +03:00
myeongjun
24afc1d3b1 Bug 1495908 - Label unexpected WebExtension manifest.json properties as a Warning r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D40413

--HG--
extra : moz-landing-system : lando
2019-09-02 15:50:26 +00:00
Edgar Chen
d9f0623861 Bug 1577175 - Part 2: Add tests; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44360

--HG--
extra : moz-landing-system : lando
2019-09-02 22:45:11 +00:00
Edgar Chen
463e0e6d20 Bug 1577175 - Part 1: Set UserGestureActivation in all ancestor of the BrowsingContext that user has interacted with; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44358

--HG--
extra : moz-landing-system : lando
2019-09-02 22:25:57 +00:00
Markus Stange
ae164c9304 Bug 1576263 - Conditionally include profiler functionality only where it's supported. r=whawkins,njn
Differential Revision: https://phabricator.services.mozilla.com/D44343

--HG--
extra : moz-landing-system : lando
2019-09-02 20:35:48 +00:00