diff --git a/common/include/km_types.h b/common/include/km_types.h index 05bc0aa432..cd0ca7f8d0 100644 --- a/common/include/km_types.h +++ b/common/include/km_types.h @@ -11,12 +11,20 @@ #if defined(__LP64__) || defined(_LP64) /* 64-bit, g++ */ -#define KMX_64BIT +#define KMX_REQUIRES_REALIGNMENT #endif #if defined(_WIN64) && !defined(USE_64) /* 64-bit, Windows */ -#define KMX_64BIT +#define KMX_REQUIRES_REALIGNMENT +#endif + +#if defined(__EMSCRIPTEN__) +// Emscripten/WASM. Emscripten even though it uses 32-bit (and not 64-bit +// pointers like the 64-bit architectures above) requires 32-bit alignment +// for pointers which we don't always have in the KMX data from file +// (see #12844). +#define KMX_REQUIRES_REALIGNMENT #endif typedef uint32_t KMX_DWORD; diff --git a/core/include/keyman/keyman_core_api.h b/core/include/keyman/keyman_core_api.h index 7863689296..6ed5847894 100644 --- a/core/include/keyman/keyman_core_api.h +++ b/core/include/keyman/keyman_core_api.h @@ -302,11 +302,15 @@ typedef uint8_t (*km_core_keyboard_imx_platform)(km_core_state*, uint32_t, void* ## Description -An error code mechanism similar to COM’s `HRESULT` scheme (unlike COM, any +An error code mechanism similar to COM's `HRESULT` scheme (unlike COM, any non-zero value is an error). ## Specification +--> +// keep in sync with web/src/engine/core-processor/src/core-factory.ts +// (see https://github.com/emscripten-core/emscripten/issues/18585) + + + + KeymanWeb Core Stress Test + + + + + + + + +

KeymanWeb Sample Page - Core Testing

+

This page is designed to stress-test the loading a KMX keyboard from blob. It will repeatedly load a .kmx using the KM_Core loader.

+

Be sure to reference the developer console for additional feedback.

+ +
+

Return to testing home page

+ + + \ No newline at end of file diff --git a/web/src/test/manual/web/core/test_8568_deadkeys.kmx b/web/src/test/manual/web/core/test_8568_deadkeys.kmx new file mode 100644 index 0000000000..88f00e8baf Binary files /dev/null and b/web/src/test/manual/web/core/test_8568_deadkeys.kmx differ diff --git a/web/src/test/manual/web/index.html b/web/src/test/manual/web/index.html index 6d608b08d3..04ad2a84fc 100644 --- a/web/src/test/manual/web/index.html +++ b/web/src/test/manual/web/index.html @@ -45,6 +45,9 @@

Light test for touch-based MutationObserver functionality

Test/stress-test touch-based MutationObserver functionality

+

Keyman Core tests

+

Stress-test kmx blob loader

+

Issue Testing

Tests OSK handling of empty rows

Tests keyboard error-handling functionality

diff --git a/web/src/test/manual/web/keyboard-errors/errorhdr.js b/web/src/test/manual/web/keyboard-errors/errorhdr.js index b784f6a476..9a0ad75939 100644 --- a/web/src/test/manual/web/keyboard-errors/errorhdr.js +++ b/web/src/test/manual/web/keyboard-errors/errorhdr.js @@ -1,17 +1,15 @@ -// JavaScript Document samplehdr.js: Keyboard management for KeymanWeb demonstration pages - -/* +/* This script is designed to test KeymanWeb error message handling. */ - function loadKeyboards() - { + function loadKeyboards() + { var kmw=keyman; - + // We start by adding a keyboard correctly. It's best to include a 'control' in our experiment. kmw.addKeyboards({id:'us',name:'English',languages:{id:'en',name:'English'}, filename:'../us-1.0.js'}); - + // Insert a keyboard that cannot be found. kmw.addKeyboards({id:'lao_2008_basic',name:'wrong-filename', languages:{ @@ -19,9 +17,9 @@ font:{family:'LaoWeb',source:['../font/saysettha_web.ttf','../font/saysettha_web.woff','../font/saysettha_web.eot']} }, filename:'./missing_file.js' // Intentional error - the file doesn't exist, so the +