Bug 534692 - [regression] Scrollbar area in compare editor too small
Summary: [regression] Scrollbar area in compare editor too small
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.8 RC1   Edit
Assignee: Simeon Andreev CLA
QA Contact: Eric Williams CLA
URL:
Whiteboard:
Keywords: regression, triaged
: 535025 (view as bug list)
Depends on:
Blocks: 533799
  Show dependency tree
 
Reported: 2018-05-15 09:16 EDT by Andrey Loskutov CLA
Modified: 2018-05-25 03:08 EDT (History)
6 users (show)

See Also:
ericwill: review+


Attachments
broken scrollbar area (60.22 KB, image/png)
2018-05-15 09:16 EDT, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2018-05-15 09:16:49 EDT
Created attachment 274044 [details]
broken scrollbar area

Something must be broken recently in compare editor.

Open diff or compare for any file (or just compare two files from any project with each other), and see that the scrollbar is shorter as the editor itself.

See attached picture taken on RHEL 7.4 (GTK 3.22) with I20180513-2000.

I believe I've seen this is also on Windows, but I have no Windows right now to verify.

I've put SWT on CC in case this is SWT issue.
Comment 1 Andrey Loskutov CLA 2018-05-15 09:49:55 EDT
This is a regression from bug 533799. Reverting commit a7bdb7b18497c21b22a979c96dbcb5e3458f925d fixes compare editor.

We should either revert it or provide a better fix.
Comment 2 Eclipse Genie CLA 2018-05-15 10:48:47 EDT
New Gerrit change created: https://git.eclipse.org/r/122683
Comment 3 Simeon Andreev CLA 2018-05-15 10:52:14 EDT
Looks like Scrollable.hScrollBarWidth used to return the preferred height of the scrollbar, but due to fix for bug 533799 now returns the width.

I've overlooked this during refactoring; should be fine now.

I also checked behaviour of snippet for bug 533799 and behaviour of Problems View, no GTK errors are printed on resize of those particular widgets.

Note that e.g. a text editor (and maybe other parts) still emit errors when resized too much, likely they need similar handling as done in tree/table for bug 533799.
Comment 4 Eric Williams CLA 2018-05-15 11:10:03 EDT
(In reply to Simeon Andreev from comment #3)
> Looks like Scrollable.hScrollBarWidth used to return the preferred height of
> the scrollbar, but due to fix for bug 533799 now returns the width.
> 
> I've overlooked this during refactoring; should be fine now.
> 
> I also checked behaviour of snippet for bug 533799 and behaviour of Problems
> View, no GTK errors are printed on resize of those particular widgets.
> 
> Note that e.g. a text editor (and maybe other parts) still emit errors when
> resized too much, likely they need similar handling as done in tree/table
> for bug 533799.

Last time I worked with scrollbars, this logic messed me up as well. :) I'll review the patch momentarily.
Comment 6 Eric Williams CLA 2018-05-15 11:21:23 EDT
(In reply to Eclipse Genie from comment #5)
> Gerrit change https://git.eclipse.org/r/122683 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=d6a5bea94a14113a5363a496b62a062bef433a11

In master now. Thanks for the quick fix Simeon.
Comment 7 Andrey Loskutov CLA 2018-05-23 13:29:50 EDT
*** Bug 535025 has been marked as a duplicate of this bug. ***
Comment 8 Niraj Modi CLA 2018-05-24 08:51:14 EDT
Please verify this fix on latest RC2 Eclipse Build id: I20180523-2000, Thanks!
Comment 9 Sravan Kumar Lakkimsetti CLA 2018-05-25 03:08:21 EDT
verified in Eclipse SDK
Version: Photon (4.8)
Build id: I20180524-0900
OS: Linux, v.4.16.10-300.fc28.x86_64, x86_64 / gtk 3.22.30
Java version: 1.8.0_171