Bug 166648 - [GTK] Cannot remove bottom margin/padding from elements styled as buttons
Summary: [GTK] Cannot remove bottom margin/padding from elements styled as buttons
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-03 05:10 PST by Michael Gratton
Modified: 2017-01-03 08:09 PST (History)
2 users (show)

See Also:


Attachments
Example HTML (343 bytes, text/html)
2017-01-03 05:10 PST, Michael Gratton
no flags Details
Screenshot of the example HTML (33.11 KB, image/png)
2017-01-03 05:11 PST, Michael Gratton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Gratton 2017-01-03 05:10:41 PST
Created attachment 297930 [details]
Example HTML

WebKitGTK+ 2.14.x + GTK+ 3.22 incorrectly renders ~8px of additional background at the bottom of any element styled as a native button. This only occurs at the bottom, not along other sides, and it doesn't seem possible to remove it using CSS, except by using -webkit-appearance: none, but then you lose the appearance of a native button.

Further, when mousing over this extra area at the bottom, although the cursor visually overlaps the button, no hover effects are triggered and it is not possible to click the button.

This is on a high DPI display, if that matters for anything.
Comment 1 Michael Gratton 2017-01-03 05:11:41 PST
Created attachment 297931 [details]
Screenshot of the example HTML
Comment 2 Michael Catanzaro 2017-01-03 08:06:47 PST
Sharp eyes. It's not a hidpi bug; I can reproduce it on my normal screen.
Comment 3 Michael Catanzaro 2017-01-03 08:09:26 PST
For anyone who wants to follow along at home, Source/WebCore/rendering/RenderThemeGtk.cpp and RenderThemeGtk::paintButton in particular is the place to start. The implementation looks sane so it'll need some debugging.