Module: wine Branch: master Commit: fc4b4be528a35b211de570a7e4ba665c181f8584 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc4b4be528a35b211de570a7e4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Feb 2 23:14:38 2016 +0300
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
---
dlls/dwrite/layout.c | 1 + dlls/dwrite/tests/layout.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 9cbbb38..7d647d8 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -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; }
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index e1903db..acc7a8f 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -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);