Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Missing pixels at 125% - 175% DPI on Windows (and also blurriness) #6462

Closed
srirambv opened this issue Dec 30, 2016 · 16 comments · Fixed by #6947
Closed

Missing pixels at 125% - 175% DPI on Windows (and also blurriness) #6462

srirambv opened this issue Dec 30, 2016 · 16 comments · Fixed by #6947

Comments

@srirambv
Copy link
Collaborator

srirambv commented Dec 30, 2016

Did you search for similar issues before submitting this one?
Yes

Describe the issue you encountered:
Autofill modal input fields top border missing

Expected behavior:
Input field should retain border when not selected

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    Windows 10 x64

  • Brave Version (revision SHA):

Brave: 0.13.0 
rev: 0c7a64d6917b6e7e72d074b05e1d7488466418a9 
Muon: 2.0.8 
libchromiumcontent: 54.0.2840.100 
V8: 5.4.500.41 
Node.js: 7.0.0 
Update Channel: dev 
os.platform: win32 
os.release: 10.0.14393 
os.arch: x64
  • Steps to reproduce:

    1. Do a clean install of 0.13.0 Preivew 7
    2. Open about:autofill, click on new address
    3. See the difference
  • Screenshot if needed:
    autofillmodal

  • Any related issues:

Test plan

#6947 (comment)

@bbondy
Copy link
Member

bbondy commented Dec 30, 2016

@cezaraugusto could you fix this, and if so put it in .13? Thanks

@cezaraugusto cezaraugusto self-assigned this Dec 30, 2016
@bsclifton
Copy link
Member

bsclifton commented Dec 30, 2016

This is a weird one... besides the borders being off (which we can fix), the fields are blurry when the blur happens

In the above shot, notice when he clicks outside the boxes to get rid of focus intentionally. Some of the field names move vertically and then the whole thing becomes slightly blurry

here's another demo which might show it more clearly:
what-the-heck

@srirambv
Copy link
Collaborator Author

Its not just the Autofill modal but the search history input also doesn't have left border
image

@bbondy bbondy added this to the 0.13.0 milestone Dec 30, 2016
@bbondy
Copy link
Member

bbondy commented Dec 30, 2016

moved this into 0.13

@bsclifton
Copy link
Member

bsclifton commented Dec 30, 2016

Possible issue details captured here https://bugs.chromium.org/p/chromium/issues/detail?id=395425
I have a fix, working on incorporating it now...

@srirambv
Copy link
Collaborator Author

image
Input field highlight is not correct.

@bsclifton
Copy link
Member

OK it appears this issue is NOT caused by #6258, since it happens when not maximized.

The possible fix I had mentioned above does work (fix being pass Brave.exe two extra params; --high-dpi-support=1 --force-device-scale-factor=1)... but it works by forcing the Brave window to render at 100% DPI. It's important to note that this fix does NOT work at 200% (and also, the window is so small it's unreadable).

The magnification is expected- Chrome 54 introduced that (in 53 and prior, 125% or less DPI were hardcoded to 100%, avoiding this issue completely for those resolutions).

It appears there is a larger issue with DPI which causes this to happen which needs to be investigated.

bsclifton added a commit to brave/muon that referenced this issue Jan 12, 2017
- don't process non-client calcsize/paint
- do proper DPI calculations when DPI > 100%

Fixes brave/browser-laptop#6258

Reverts 182fe6d
Which I believe incorrectly fixed the problem with Chromium 53
(see discussion at electron/electron#7416 for more info)

We need to test to confirm, but I believe this change will fix:
brave/browser-laptop#4502
brave/browser-laptop#6462
brave/browser-laptop#6468
brave/browser-laptop#6481
bsclifton added a commit to brave/muon that referenced this issue Jan 12, 2017
- don't process non-client calcsize/paint
- do proper DPI calculations when DPI > 100%

Auditors: @bbondy, @darkdh

Fixes brave/browser-laptop#6258

Reverts 182fe6d
Which I believe incorrectly fixed the problem with Chromium 53
(see discussion at electron/electron#7416 for more info)

We need to test to confirm, but I believe this change will fix:
brave/browser-laptop#4502
brave/browser-laptop#6462
brave/browser-laptop#6468
brave/browser-laptop#6481
@bsclifton
Copy link
Member

Unfortunately, this was not fixed with brave/muon@30fd6ff (although it does look better).

The issue seen above in the GIF I captured still happens

@bsclifton
Copy link
Member

It seems that this only looks correct when at either 100% or 200% ☹️

@srirambv
Copy link
Collaborator Author

The input field border issue is not just on browser element its also same on webpages. Below is the screen grab on autofill how the input fields look before and after autofill.

@bsclifton as per slack conversation you mentioned the magnification is how it should work in CR54 build. Can the parameters --high-dpi-support=1 --force-device-scale-factor=1 be hardcoded for resolutions higher than 100% DPI, for 0.13.0 release, solving both magnification and the input fields issue?

autofillborder

@bsclifton
Copy link
Member

@srirambv no, we can't hardcode those params unfortunately. @jonathansampson tried them and Brave was unusable because it stayed at the 100% resolution size on his 200% DPI monitor. We need to respect the OS DPI settings

@bsclifton
Copy link
Member

May be the same issue as discussed with #6698 (comment)

@bsclifton
Copy link
Member

This is a fairly complex problem and will take some time to solve. Although high DPI Windows users may have some ugliness, Brave is still very usable; I don't believe this should be a blocker for 0.13.0. I'm going to move this to 0.13.1 😄

@bsclifton
Copy link
Member

I don't believe the root cause for this issue is the same as #6698, which appears to only affect the size of the rendering area.

The problem seen here appears to be that the content is scaled improperly

@bsclifton bsclifton changed the title Autofill modal input fields top border missing Missing pixels at 125% - 175% DPI on Windows (and also blurriness) Jan 30, 2017
@bsclifton
Copy link
Member

bsclifton commented Jan 31, 2017

I have found the root cause for this issue! cc: @bbondy, @bridiver, @darkdh

The missing pixels and blurriness are happening because we set the command line flag enable-use-zoom-for-dsf to false. If you remove this line, it works great!

Before we enable this (as the comment shows in the code), it's important to understand that adding this fixed the following issues (on Chromium 53):

We need to make sure removing this code does not cause these closed issues to reappear! At first glance, I didn't see any issues but we'll want to do more testing of course.

I believe that fixing this issue should also fix the following issues:
#6777 - Bookmark hanger items are not properly aligned & text looks blurry
#6144 - Rendering with ClearType
#3556 - Text is blurry in page content, tab labels, and URL bar
#2089 - Question: Can you keep the ability of good font rendering?

bsclifton added a commit that referenced this issue Jan 31, 2017
…n Windows

This was originally added to fix #4517, #4518, and #4472... but is no longer needed (I confirmed all those situations work).

Fixes #6462
Fixes #6777
Fixes #6144
Fixes #3556
Fixes #2089

Auditors: @bridiver, @bbondy, @darkdh
bbondy pushed a commit that referenced this issue Jan 31, 2017
…n Windows

This was originally added to fix #4517, #4518, and #4472... but is no longer needed (I confirmed all those situations work).

Fixes #6462
Fixes #6777
Fixes #6144
Fixes #3556
Fixes #2089

Auditors: @bridiver, @bbondy, @darkdh
@srirambv
Copy link
Collaborator Author

srirambv commented Feb 1, 2017

Looks good on 0.13.1 RC2. Also font looks crisp
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.