Add NUM_VALUES for enums and size for structs (see #3836)

API versioning requires that enumerations end with a count value
(`*_NUM_VALUES`) and structs begin with a size value (`size_t size`).
Wrapper templates are updated to support structs with different size
values indicating different versions.

To test:
Run `ceftests --gtest_filter=ApiVersionTest.StructVersion*`
This commit is contained in:
Marshall Greenblatt
2025-01-09 19:14:53 -05:00
parent ee5cec12d2
commit 81a5005bc0
43 changed files with 777 additions and 228 deletions

View File

@@ -1629,7 +1629,8 @@ class OSRTestHandler : public RoutingTestHandler,
// Use a thin black underline by default.
CefRange range(0, static_cast<uint32_t>(markedText.length()));
cef_composition_underline_t line = {range, 0xFF000000, 0, false};
cef_composition_underline_t line = {sizeof(cef_composition_underline_t),
range, 0xFF000000, 0, false};
underlines.push_back(line);
CefRange replacement_range(0, static_cast<uint32_t>(markedText.length()));
@@ -1654,7 +1655,8 @@ class OSRTestHandler : public RoutingTestHandler,
// Use a thin black underline by default.
CefRange range(0, static_cast<uint32_t>(markedText.length()));
cef_composition_underline_t line = {range, 0xFF000000, 0, false};
cef_composition_underline_t line = {sizeof(cef_composition_underline_t),
range, 0xFF000000, 0, false};
underlines.push_back(line);
CefRange replacement_range(0, static_cast<uint32_t>(markedText.length()));