Commit Graph

70192 Commits

Author SHA1 Message Date
Tobias Taschner
e8371824bd Disable new methods for webkit1 2021-02-28 20:48:01 +01:00
Tobias Taschner
f419240335 Add Apple transport security to wxWebView docs 2021-02-28 20:44:38 +01:00
Tobias Taschner
ca5133fff7 Add usage documentation to wxWebView::AddScriptMessageHandler() 2021-02-28 20:41:49 +01:00
Tobias Taschner
d4a9ec2448 Define unused parameters differently to improve intellisense 2021-02-28 20:14:38 +01:00
Tobias Taschner
166d7e2c83 Fix unused warning in sample 2021-02-28 20:06:59 +01:00
Tobias Taschner
575ae90d85 Fix trailing whitespace 2021-02-28 20:03:36 +01:00
Tobias Taschner
2a16638e2a Fix EOL issues 2021-02-28 20:03:31 +01:00
Tobias Taschner
2c3d179923 Implement common web message identifier for macOS 2021-02-28 19:57:33 +01:00
Tobias Taschner
a27f73367c Implement AddUserScript() for WKWebView backend 2021-02-28 19:55:19 +01:00
Tobias Taschner
29bfcdfd5e Add common web message identifier 2021-02-27 11:55:50 +01:00
Tobias Taschner
c9606d7b5a Implement AddUserScript() for GTK 2021-02-27 10:59:23 +01:00
Tobias Taschner
4d78437a77 Implement AddUserScript() for edge backend 2021-02-26 23:41:39 +01:00
Tobias Taschner
6f7ac6a934 Add wxWebView::AddUserScript()
This allows to inject javascript code across multiple pages
2021-02-26 23:41:39 +01:00
Tobias Taschner
f2bfa7d446 Initial AddScriptMessageHandler() documentation 2021-02-26 22:35:49 +01:00
Tobias Taschner
b1d558a612 Disabled dev tools per default for Edge
This unifies the behavior among backends and is probably
the more useful default for most applications.
2021-02-26 21:55:10 +01:00
Tobias Taschner
2d007ff3f1 Add named script handler to edge 2021-02-26 21:51:15 +01:00
Tobias Taschner
140e9825b7 Log error if script handler cannot be added 2021-02-26 21:41:02 +01:00
Tobias Taschner
a09713de5f Decode web message result like RunScript() result 2021-02-26 21:37:23 +01:00
Tobias Taschner
71f745e647 Implement script message for GTK backend 2021-02-26 21:27:50 +01:00
Tobias Taschner
3af4702b11 Implement wxWebView::EnableAccessToDevTools() for GTK 2021-02-26 18:53:46 +01:00
Tobias Taschner
302ae644dd Fix mixed EOL 2021-02-26 17:11:33 +01:00
Tobias Taschner
3f23273f46 Fix typo in sample 2021-02-26 16:59:57 +01:00
Tobias Taschner
04d22cc9f6 Add RemoveScriptMessage handler and return bool 2021-02-26 16:59:57 +01:00
Tobias Taschner
c3d0d7d000 Identify script handler in message event 2021-02-26 16:59:56 +01:00
Tobias Taschner
c78147b267 Add script command handler to sample 2021-02-26 16:59:56 +01:00
Tobias Taschner
5b838ae6c1 Fix unused warning 2021-02-26 16:59:56 +01:00
Tobias Taschner
a7ff7a8012 Implement script message for WKWebView backend 2021-02-26 16:59:56 +01:00
Tobias Taschner
edcaf5210e Implement script message for edge backend 2021-02-26 15:41:42 +01:00
Tobias Taschner
011035ef08 Add wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED event 2021-02-26 15:41:41 +01:00
Vadim Zeitlin
752ba82041 Fix format specifier used for wParam in wxMSW WM_POWER handler
wParam is 64 bits in 64 bit builds and can't be used with "%d", we need
"%zd" for it.

Closes #19080.
2021-02-24 13:29:27 +01:00
Paul Cornett
f25d48fbd5 Use a more accurate size for wxTimePickerCtrlGeneric
See #19078
2021-02-23 23:12:43 -08:00
ali kettab
2689040769 Remove unnecessary hack from ListBaseTestCase under wxGTK
The tests pass without it now, so simplify the test code added in
fedc80eee3 (Improve selection and focus events generation in
wxGenericLisCtrl, 2020-09-06).

Closes https://github.com/wxWidgets/wxWidgets/pull/2249
2021-02-23 21:54:15 +01:00
Vadim Zeitlin
0728262640 Provide descriptions for WinHTTP error messages
Just the error code is not very useful as it doesn't say anything about
what exactly failed, e.g. seeing "The buffers supplied to a function was
too small." doesn't help understanding which function was passed a too
small buffer, so add an extra parameter to SetFailed[WithLastError]() to
log this information too.

Also log the error code itself, because SEC_E_BUFFER_TOO_SMALL is
arguably more clear than its ungrammatical error message.

No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2247
2021-02-23 21:53:11 +01:00
Vadim Zeitlin
2c9f6770a5 Merge branch 'valnum-unsigned'
Fix handling of unsigned types in numeric validators: don't accept
negative numbers as unsigned, allow using the full 64-bit range.

See https://github.com/wxWidgets/wxWidgets/pull/2244

Closes #12967.
2021-02-23 21:52:27 +01:00
Vadim Zeitlin
4cd2cb0acd Merge branch 'win-val-self' of https://github.com/AliKet/wxWidgets
Make wxWindow::TransferData{To,From}Window and Validate work on the
window itself too.

See https://github.com/wxWidgets/wxWidgets/pull/2235
2021-02-23 21:48:16 +01:00
Joao Matos
152970a52a Fix missing event objects in WebViewGTK events. 2021-02-23 10:04:50 -08:00
Paul Cornett
1406d3dc03 Simplify wxWebView zoom conversion code
So there is no need to "shut up compilers"
2021-02-23 10:01:18 -08:00
Paul Cornett
1508fa1e4c Use a more accurate width for wxDatePickerCtrlGeneric
See #19078
2021-02-23 10:01:01 -08:00
ali kettab
ec20753685 Add tests showing transferring data (to, from) self (window) works correctly 2021-02-22 14:31:20 +01:00
Vadim Zeitlin
72a24b402b Fix deleting of wxTextCtrl in wxNumValidator test case
This was broken in da973c3caf (Get rid of CppUnit boilerplate in numeric
validator unit tests, 2021-02-21) which replaced DestroyChildren() in
the old CppUnit test case dtor with just "delete m_text", as this didn't
take care of "text2" created in one of the tests.

Using DestroyChildren() still seems overly side, so ensure that "text2"
is destroyed explicitly.
2021-02-22 14:26:23 +01:00
Vadim Zeitlin
bdaca38904 Fix transferring unsigned values to the window too
In addition to not accepting "-1" as a valid unsigned value, we also
must not format unsigned values as signed ones, i.e. we need to use
wxNumberFormatter::ToString() overload taking unsigned for them.

Do it in wxIntegerValidatorBase::ToString(), used by TransferToWindow(),
and add more tests for the latter.

Also reorganize the tests in sections and use REQUIRE() for the checks
that should prevent the rest of the section from running if they fail.
2021-02-22 12:58:14 +01:00
Vadim Zeitlin
483856f3d3 Add wxIntegerValidatorBase::ULongestValueType typedef
Allow just writing ULongestValueType instead of writing #ifdefs in
several places.
2021-02-22 12:58:14 +01:00
Vadim Zeitlin
94289a46b1 Relax check for converting "-" to long long in the unit tests
This somehow succeeds when using gcc 4.8 under Ubuntu 14.04 or MinGW
5.3, so don't fail the tests in this case, but still warn about it
because it seems quite unexpected.
2021-02-22 12:57:58 +01:00
Vadim Zeitlin
a91cb5c344 Use CHECK_FALSE in wxNumberFormatter unit tests
Just replace CHECK(!condition) with CHECK_FALSE(condition), this should
result in slightly more clear error messages.

Also make tests for long and long long more consistent.
2021-02-22 11:55:32 +01:00
Vadim Zeitlin
cddc657505 Use min/max values of correct type in numeric validators
Use the actual type of the value, not LongestValueType, for storing
m_min and m_max as this is necessary for the comparisons between the
value and them to work correctly for unsigned types.

Also check for precision loss when converting from the bigger
LongestValueType to the actual type.

Add new unit tests, that failed before, but pass now.
2021-02-22 11:49:19 +01:00
Vadim Zeitlin
f1e6af089a Fix parsing unsigned numbers in wxIntegerValidatorBase
Use wxNumberFormatter::FromString() overload taking wxULongLong_t to
allow parsing numbers greater than LLONG_MAX.
2021-02-22 11:49:19 +01:00
Vadim Zeitlin
eb64202ad4 Add support for unsigned long long to wxNumberFormatter
This is necessary in order to deal with the numbers greater than
wxINT64_MAX that can't be represented in just long long.

It also allows to implement the intuitive handling of minus sign for the
unsigned numbers, i.e. not to accept it in FromString(), unlike the
standard functions which do (and parse -1 as 0xffff...fff).

Also extend the tests to check for more boundary cases.
2021-02-22 11:49:19 +01:00
Vadim Zeitlin
06bb60f0f8 Merge branch 'curlmultisocket' of https://github.com/NewPagodi/wxWidgets
Rewrite CURL-based wxWebRequest implementation using multi-socket
support for much better efficiency and reliability.

See https://github.com/wxWidgets/wxWidgets/pull/2193
2021-02-22 00:40:53 +01:00
Vadim Zeitlin
d8113b36c3 Merge branch '12764-faster-grid-attr-lookup' of https://github.com/discnl/wxWidgets
Improve responsiveness of a wxGrid with many attributes by using hash
map instead of array for storing them and looking them up.

See https://github.com/wxWidgets/wxWidgets/pull/2229
2021-02-22 00:21:31 +01:00
Vadim Zeitlin
b53f7ac904 Restore support for using faster dotted pens in wxMSW
Changes of d245dc9e1f (Fix drawing of dotted lines with wxDC in wxMSW,
2020-03-27) improved the appearance of dotted and dashed lines in wxMSW
but at the expense of significant (up to a factor of 300) slowdown.

Allow the applications for which the drawing performance is important to
explicitly request the old behaviour, with uglier, but faster, pens by
choosing to use low quality pens.

Update the graphics benchmark to allow specifying the pen quality and
verify that the performance when using it is the same as before 3.1.4.

See https://github.com/wxWidgets/wxWidgets/pull/2218

See #7097.

Closes #18875.
2021-02-22 00:04:07 +01:00