dwrite: Invalidate layout on all cases of attribute change.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-02-02 23:14:38 +03:00 committed by Alexandre Julliard
parent 2b59029aa1
commit fc4b4be528
2 changed files with 2 additions and 2 deletions

View File

@ -2363,6 +2363,7 @@ static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layo
list_add_after(&outer->entry, &cur->entry);
list_add_after(&cur->entry, &right->entry);
layout->recompute = RECOMPUTE_EVERYTHING;
return S_OK;
}

View File

@ -3467,10 +3467,9 @@ static void test_GetLineMetrics(void)
hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 2, 2, &count);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(count == 2, "got %u\n", count);
todo_wine {
ok(metrics[3].height > metrics[1].height, "got %f, old %f\n", metrics[3].height, metrics[1].height);
ok(metrics[3].baseline > metrics[1].baseline, "got %f, old %f\n", metrics[3].baseline, metrics[1].baseline);
}
/* revert to original format */
hr = IDWriteTextLayout_SetFontSize(layout, 12.0f, range);
ok(hr == S_OK, "got 0x%08x\n", hr);