Commit acfb6ea2 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

richedit: Do not read actual scrollbar state for scrollbar update, use internal state instead.

parent 9d39754e
......@@ -1807,6 +1807,13 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) {
ed->notified_cr.cpMin = ed->notified_cr.cpMax = 0;
/* Default vertical scrollbar information */
ed->vert_si.cbSize = sizeof(SCROLLINFO);
ed->vert_si.nMin = 0;
ed->vert_si.nMax = 0;
ed->vert_si.nPage = 0;
ed->vert_si.nPos = 0;
return ed;
}
......@@ -3055,15 +3062,29 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
return (wParam >= 0x40000) ? 0 : MAKELONG( pt.x, pt.y );
}
case WM_CREATE:
{
SCROLLINFO si;
GetClientRect(hWnd, &editor->rcFormat);
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_HSCROLL)
{ /* Squelch the default horizontal scrollbar it would make */
ShowScrollBar(editor->hWnd, SB_HORZ, FALSE);
}
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL)
si.fMask |= SIF_DISABLENOSCROLL;
si.nMax = (si.fMask & SIF_DISABLENOSCROLL) ? 1 : 0;
si.nMin = 0;
si.nPage = 0;
SetScrollInfo(hWnd, SB_VERT, &si, TRUE);
ME_CommitUndo(editor);
ME_WrapMarkedParagraphs(editor);
ME_MoveCaret(editor);
return 0;
}
case WM_DESTROY:
ME_DestroyEditor(editor);
SetWindowLongPtrW(hWnd, 0, 0);
......
......@@ -343,6 +343,9 @@ typedef struct tagME_TextEditor
/* Track previous notified selection */
CHARRANGE notified_cr;
/* Cache previously set vertical scrollbar info */
SCROLLINFO vert_si;
} ME_TextEditor;
typedef struct tagME_Context
......
......@@ -784,6 +784,7 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
ME_Repaint(editor);
}
editor->vert_si.nMax = 0;
ME_UpdateScrollBar(editor);
}
......@@ -806,6 +807,14 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
bScrollBarWasVisible = ME_GetYScrollVisible(editor);
bScrollBarWillBeVisible = editor->nHeight > editor->sizeWindow.cy;
si.fMask = SIF_PAGE | SIF_RANGE;
if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL)
si.fMask |= SIF_DISABLENOSCROLL;
if ((si.fMask & SIF_DISABLENOSCROLL))
{
bScrollBarWillBeVisible = TRUE;
}
if (bScrollBarWasVisible != bScrollBarWillBeVisible)
{
ShowScrollBar(hWnd, SB_VERT, bScrollBarWillBeVisible);
......@@ -813,17 +822,27 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
ME_WrapMarkedParagraphs(editor);
}
si.fMask = SIF_PAGE | SIF_RANGE;
if (GetWindowLongW(hWnd, GWL_STYLE) & ES_DISABLENOSCROLL)
si.fMask |= SIF_DISABLENOSCROLL;
si.nMin = 0;
si.nMax = editor->nTotalLength;
si.nPage = editor->sizeWindow.cy;
TRACE("min=%d max=%d page=%d\n", si.nMin, si.nMax, si.nPage);
SetScrollInfo(hWnd, SB_VERT, &si, TRUE);
if (!(si.nMin == editor->vert_si.nMin && si.nMax == editor->vert_si.nMax && si.nPage == editor->vert_si.nPage))
{
TRACE("min=%d max=%d page=%d\n", si.nMin, si.nMax, si.nPage);
editor->vert_si.nMin = si.nMin;
editor->vert_si.nMax = si.nMax;
editor->vert_si.nPage = si.nPage;
if (bScrollBarWillBeVisible)
{
SetScrollInfo(hWnd, SB_VERT, &si, TRUE);
}
else
{
if (bScrollBarWasVisible && !(si.fMask & SIF_DISABLENOSCROLL))
ShowScrollBar(hWnd, SB_VERT, FALSE);
}
}
}
int ME_GetYScrollPos(ME_TextEditor *editor)
......@@ -836,10 +855,7 @@ int ME_GetYScrollPos(ME_TextEditor *editor)
BOOL ME_GetYScrollVisible(ME_TextEditor *editor)
{ /* Returns true if the scrollbar is visible */
SCROLLBARINFO sbi;
sbi.cbSize = sizeof(sbi);
GetScrollBarInfo(editor->hWnd, OBJID_VSCROLL, &sbi);
return ((sbi.rgstate[0] & STATE_SYSTEM_INVISIBLE) == 0);
return (editor->vert_si.nMax - editor->vert_si.nMin >= max(editor->vert_si.nPage - 1, 0));
}
void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun)
......
......@@ -2286,11 +2286,9 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
......@@ -2299,11 +2297,9 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text);
memset(&si, 0, sizeof(si));
......@@ -2384,26 +2380,22 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1,
"reported page/range is %d (%d..%d) expected 0 (0..1)\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1,
"reported page/range is %d (%d..%d) expected 0 (0..1)\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text);
memset(&si, 0, sizeof(si));
......@@ -2422,10 +2414,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
si.nPage, si.nMin, si.nMax);
......@@ -2436,10 +2426,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
si.nPage, si.nMin, si.nMax);
......@@ -2449,10 +2437,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
si.nPage, si.nMin, si.nMax);
......@@ -2462,10 +2448,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
si.nPage, si.nMin, si.nMax);
......@@ -2475,10 +2459,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
si.nPage, si.nMin, si.nMax);
......@@ -2494,10 +2476,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100,
"reported page/range is %d (%d..%d) expected 0 (0..100)\n",
......@@ -2510,10 +2490,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100,
"reported page/range is %d (%d..%d) expected 0 (0..100)\n",
......@@ -2526,10 +2504,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100,
"reported page/range is %d (%d..%d) expected 0 (0..100)\n",
......@@ -2542,10 +2518,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100,
"reported page/range is %d (%d..%d) expected 0 (0..100)\n",
......@@ -2558,10 +2532,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
}
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100,
"reported page/range is %d (%d..%d) expected 0 (0..100)\n",
......@@ -2591,11 +2563,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2603,11 +2574,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a");
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2615,11 +2585,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2627,11 +2596,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2649,10 +2617,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0,
"reported page/range is %d (%d..%d)\n",
si.nPage, si.nMin, si.nMax);
......@@ -2662,10 +2628,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0,
"reported page/range is %d (%d..%d)\n",
si.nPage, si.nMin, si.nMax);
......@@ -2688,10 +2652,8 @@ static void test_scrollbar_visibility(void)
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
}
ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0,
"reported page/range is %d (%d..%d)\n",
si.nPage, si.nMin, si.nMax);
......@@ -2749,11 +2711,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
/* Ditto, see above */
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
......@@ -2762,50 +2723,46 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
/* Ditto, see above */
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a");
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
/* Ditto, see above */
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na");
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
/* Ditto, see above */
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
todo_wine {
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0),
"Vertical scrollbar is invisible, should be visible.\n");
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text);
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
......@@ -2829,11 +2786,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2841,11 +2797,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a");
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2853,11 +2808,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2865,11 +2819,10 @@ static void test_scrollbar_visibility(void)
GetScrollInfo(hwndRichEdit, SB_VERT, &si);
ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0),
"Vertical scrollbar is visible, should be invisible.\n");
todo_wine {
ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 0,
"reported page/range is %d (%d..%d) expected all 0\n",
si.nPage, si.nMin, si.nMax);
}
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text);
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
......@@ -2980,19 +2933,15 @@ static void test_scrollbar_visibility(void)
WM_SIZE_recursionLevel = 0;
bailedOutOfRecursion = FALSE;
hwndRichEdit = new_window(cls.lpszClassName, ES_MULTILINE, NULL);
todo_wine {
ok(!bailedOutOfRecursion,
"WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
}
recursionLevel = 0;
WM_SIZE_recursionLevel = 0;
bailedOutOfRecursion = FALSE;
MoveWindow(hwndRichEdit, 0, 0, 250, 100, TRUE);
todo_wine {
ok(!bailedOutOfRecursion,
"WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
}
/* Unblock window in order to process WM_DESTROY */
recursionLevel = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment