dwrite: Fix identical ranges merging.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3c16587ed4
commit
b02e61c4b3
|
@ -2136,7 +2136,7 @@ static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layo
|
|||
|
||||
/* for all existing ranges covered by new one update value */
|
||||
while (cur && is_in_layout_range(&value->range, &cur->range)) {
|
||||
changed = set_layout_range_attrval(cur, attr, value);
|
||||
changed |= set_layout_range_attrval(cur, attr, value);
|
||||
cur = LIST_ENTRY(list_next(ranges, &cur->entry), struct layout_range_header, entry);
|
||||
}
|
||||
|
||||
|
@ -2145,7 +2145,7 @@ static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layo
|
|||
r.startPosition = cur->range.startPosition;
|
||||
r.length = value->range.startPosition + value->range.length - cur->range.startPosition;
|
||||
left = alloc_layout_range_from(cur, &r);
|
||||
changed = set_layout_range_attrval(left, attr, value);
|
||||
changed |= set_layout_range_attrval(left, attr, value);
|
||||
cur->range.startPosition += left->range.length;
|
||||
cur->range.length -= left->range.length;
|
||||
list_add_before(&cur->entry, &left->entry);
|
||||
|
|
|
@ -2056,17 +2056,17 @@ if (0) /* crashes on native */
|
|||
range.length = 0;
|
||||
hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, sizeof(buffW)/sizeof(WCHAR), &range);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
todo_wine {
|
||||
todo_wine
|
||||
ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW));
|
||||
ok(range.startPosition == 0 && range.length == ~0u, "got %u,%u\n", range.startPosition, range.length);
|
||||
}
|
||||
|
||||
/* check what's returned for positions after the text */
|
||||
buffW[0] = 0;
|
||||
range.length = 0;
|
||||
hr = IDWriteTextLayout_GetLocaleName(layout, 100, buffW, sizeof(buffW)/sizeof(WCHAR), &range);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW));
|
||||
todo_wine
|
||||
ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW));
|
||||
ok(range.startPosition == 0 && range.length == ~0u, "got %u,%u\n", range.startPosition, range.length);
|
||||
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
|
Loading…
Reference in New Issue