mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -47,6 +47,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
[colorAttr colorUsingColorSpace:NSColorSpace.deviceRGBColorSpace]);
|
||||
}
|
||||
cef_composition_underline_t line = {
|
||||
sizeof(cef_composition_underline_t),
|
||||
{static_cast<uint32_t>(range.location),
|
||||
static_cast<uint32_t>(NSMaxRange(range))},
|
||||
color,
|
||||
@@ -145,7 +146,8 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
||||
ExtractUnderlines(aString, &underlines_);
|
||||
} else {
|
||||
// Use a thin black underline by default.
|
||||
cef_composition_underline_t line = {{0, length}, ColorBLACK, 0, false};
|
||||
cef_composition_underline_t line = {
|
||||
sizeof(cef_composition_underline_t), {0, length}, ColorBLACK, 0, false};
|
||||
underlines_.push_back(line);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user