Imported Upstream version 5.16.0.122

Former-commit-id: 60dd6d91c5dc30a6569681c1b8d7cddebae4e52b
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-08-28 08:15:10 +00:00
parent f8f43c9aed
commit 73002b0b4a
177 changed files with 232 additions and 77 deletions

View File

@ -1 +1 @@
08937f5469bcd2eed7c5ba779294b6329f3b024a
aa4a18e66f03d372bbfbf88bad59a917e88c220d

View File

@ -1 +1 @@
3d964514092c9f16851f6124107670d90d829880
ca90da6739acdd4c5d81033f68f9db54ff41467f

View File

@ -34,11 +34,11 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.16.0.120";
public const string MonoVersion = "5.16.0.122";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
public const int MonoCorlibVersion = 1051600010;
public const int MonoCorlibVersion = 1051600011;
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0

View File

@ -142,3 +142,9 @@ notepad.exe: samples/notepad.cs $(topdir)/class/lib/$(PROFILE)/System.Windows.Fo
test-notepad: notepad.exe
$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) notepad.exe
issue10235.exe: samples/issue10235.cs $(topdir)/class/lib/$(PROFILE)/System.Windows.Forms.dll $(topdir)/class/lib/$(PROFILE)/System.Drawing.dll $(topdir)/class/lib/$(PROFILE)/System.dll $(topdir)/class/lib/$(PROFILE)/mscorlib.dll
$(CSCOMPILE) -out:$@ samples/issue10235.cs -r:$(topdir)/class/lib/$(PROFILE)/System.Windows.Forms.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Drawing.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
test-issue10235: issue10235.exe
$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) issue10235.exe

View File

@ -195,8 +195,13 @@ namespace System.Windows.Forms.Layout
{
IArrangedContainer parent = (IArrangedContainer)container;
LayoutDockedChildren (parent, parent.Controls);
LayoutAnchoredChildren (parent, parent.Controls);
if (parent.Controls is Control.ControlCollection controlCollection) {
LayoutDockedChildren (parent, controlCollection.GetAllControls());
LayoutAnchoredChildren (parent, controlCollection.GetAllControls());
} else {
LayoutDockedChildren (parent, parent.Controls);
LayoutAnchoredChildren (parent, parent.Controls);
}
return parent.AutoSize;
}

View File

@ -73,6 +73,9 @@ namespace System.Windows.Forms
internal bool has_been_focused;
private bool delayed_font_or_color_change;
private int requested_height;
internal int selection_length = -1; // set to the user-specified selection length, or -1 if none
internal bool show_caret_w_selection; // TextBox shows the caret when the selection is visible
internal int canvas_width;
@ -163,6 +166,8 @@ namespace System.Windows.Forms
Cursor = Cursors.IBeam;
requested_height = Height;
can_cache_preferred_size = true;
}
#endregion // Internal Constructor
@ -1008,6 +1013,9 @@ namespace System.Windows.Forms
protected override void OnHandleCreated (EventArgs e)
{
base.OnHandleCreated (e);
if (delayed_font_or_color_change) {
TextBoxBase_FontOrColorChanged (this, e);
}
FixupHeight ();
}
@ -1467,20 +1475,13 @@ namespace System.Windows.Forms
{
// Make sure we don't get sized bigger than we want to be
if ((specified & BoundsSpecified.Height) != 0) {
requested_height = height;
}
if (!richtext) {
if (!document.multiline) {
if (height != PreferredHeight) {
// If the specified has Height, we need to store that in the
// ExplicitBounds because we are going to override it
if ((specified & BoundsSpecified.Height) != 0) {
Rectangle r = ExplicitBounds;
r.Height = height;
ExplicitBounds = r;
specified &= ~BoundsSpecified.Height;
}
height = PreferredHeight;
}
height = PreferredHeight;
}
}
@ -1763,13 +1764,15 @@ namespace System.Windows.Forms
private void FixupHeight ()
{
if (!richtext) {
int saved_requested_height = requested_height;
if (!document.multiline) {
if (PreferredHeight != Height) {
SetBoundsCore (Left, Top, Width, PreferredHeight, BoundsSpecified.None);
SetBoundsCore (Left, Top, Width, PreferredHeight, BoundsSpecified.Height);
}
} else {
SetBoundsCore (Left, Top, Width, Math.Max(PreferredHeight, ExplicitBounds.Height), BoundsSpecified.None);
SetBoundsCore (Left, Top, Width, Math.Max(PreferredHeight, requested_height), BoundsSpecified.Height);
}
requested_height = saved_requested_height;
}
}
@ -2238,8 +2241,10 @@ namespace System.Windows.Forms
{
Line line;
if (!IsHandleCreated)
if (!IsHandleCreated) {
delayed_font_or_color_change = true;
return;
}
document.SuspendRecalc ();
// Font changes apply to the whole document

View File

@ -81,13 +81,57 @@ namespace Mono {
return true;
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern string ExceptionToState_internal (Exception exc, out ulong portable_hash, out ulong unportable_hash);
static Tuple<String, ulong, ulong>
ExceptionToState (Exception exc)
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void DisableMicrosoftTelemetry (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
static extern void DisableMicrosoftTelemetry ();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
static void SendMicrosoftTelemetry (string payload_str, ulong portable_hash, ulong unportable_hash)
{
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
using (var payload_chars = RuntimeMarshal.MarshalString (payload_str))
{
SendMicrosoftTelemetry_internal (payload_chars.Value, portable_hash, unportable_hash);
}
} else {
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
}
}
// Usage:
//
// catch (Exception exc) {
// var monoType = Type.GetType ("Mono.Runtime", false);
// var m = monoType.GetMethod("SendExceptionToTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
// m.Invoke(null, new object[] { exc });
// }
static void SendExceptionToTelemetry (Exception exc)
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
SendMicrosoftTelemetry (payload_str, portable_hash, unportable_hash);
}
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str)
{
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {

View File

@ -1 +0,0 @@
59b3f707d19de8e43e7469a739cdafaa2206c784

View File

@ -1 +0,0 @@
f084e3004aa6da6e79446be9001e26a9ad6195ac

View File

@ -1 +0,0 @@
85b4839a807f2bf411aa32ab0ba84451e144a568

View File

@ -1 +0,0 @@
f304ed214eea68de0cb5ecd50dd0de4c8b84718d

View File

@ -1 +0,0 @@
3235d75c575b0982db4136b0ccfeba72588886ca

View File

@ -1 +0,0 @@
c719ef566f1dbfa272ea10ce17301e8b27423fab

View File

@ -1 +0,0 @@
90855d0cb7cd711c546a29e6e3513d3a3042d76b

View File

@ -0,0 +1 @@
cef7d484610be59efcf7b70e16834aebf1a4d463

View File

@ -0,0 +1 @@
8cf110b2790d47adfe417f38eaae7079a1d0a26f

View File

@ -0,0 +1 @@
c17fac1cfeadd8f77de613dea02e4a7430169375

View File

@ -0,0 +1 @@
6e68d2b5f8a9bb7947ebfe9d312d2e39d275a8f4

View File

@ -0,0 +1 @@
316250e4d7392e94b2d57802f5cc587bdda6f3fd

View File

@ -0,0 +1 @@
709e2757f8b426cb600a4f28b2d9e65d106a16db

View File

@ -0,0 +1 @@
7a2ffb29f2f05c482f0ac022f9a0a4e53def0571

View File

@ -1 +0,0 @@
59b3f707d19de8e43e7469a739cdafaa2206c784

View File

@ -1 +0,0 @@
f084e3004aa6da6e79446be9001e26a9ad6195ac

View File

@ -1 +0,0 @@
85b4839a807f2bf411aa32ab0ba84451e144a568

View File

@ -1 +0,0 @@
f304ed214eea68de0cb5ecd50dd0de4c8b84718d

View File

@ -1 +0,0 @@
3235d75c575b0982db4136b0ccfeba72588886ca

View File

@ -1 +0,0 @@
c719ef566f1dbfa272ea10ce17301e8b27423fab

View File

@ -1 +0,0 @@
90855d0cb7cd711c546a29e6e3513d3a3042d76b

View File

@ -0,0 +1 @@
cef7d484610be59efcf7b70e16834aebf1a4d463

View File

@ -0,0 +1 @@
8cf110b2790d47adfe417f38eaae7079a1d0a26f

Some files were not shown because too many files have changed in this diff Show More