Bug 35090 - Need -webkit-focus-inner to control the style of buttons
Summary: Need -webkit-focus-inner to control the style of buttons
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 05:09 PST by Shinichiro Hamaji
Modified: 2010-07-21 20:25 PDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (12.81 KB, patch)
2010-02-18 05:12 PST, Shinichiro Hamaji
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinichiro Hamaji 2010-02-18 05:09:57 PST
With Firefox, we can change the style of anonymous render blocks in buttons using -moz-focus-inner pseudo element.

This would be especially useful for Chrome because its buttons have some paddings to match the behavior of Firefox and currently there are no way to disable the paddings. See Bug 24048 for detail.

The chromium bug for this issue: http://crbug.com/1437
Comment 1 Shinichiro Hamaji 2010-02-18 05:12:36 PST
Created attachment 48999 [details]
Patch v1
Comment 2 Shinichiro Hamaji 2010-02-18 05:13:55 PST
I added baseStyle parameter for CSSStyleSelector::pseudoStyleForElement and this would be the most tricky point of my patch. We cannot use the existing parameter parentStyle because paddings aren't inherited.

I think this solution isn't so bad, but I'm not 100% sure if this is the best. Any kind of suggestions will be really appreciated :)
Comment 3 Adam Barth 2010-03-22 10:13:49 PDT
Comment on attachment 48999 [details]
Patch v1

Your ChangeLog doesn't give any information about this change.

I didn't understand why this part was necessary:

-void RenderButton::setupInnerStyle(RenderStyle* innerStyle) 
+void RenderButton::setupInnerStyle()

This patch has been up for review for over a month with no discussion.

Why do we want to implement this non-standard feature?  Doesn't that just serve to fragment the web platform?  Is this a feature that we'd like to see standardized at some point?
Comment 4 Shinichiro Hamaji 2010-07-21 20:25:07 PDT
The internal padding has gone so we don't need to provide a way to adjust it.

https://bugs.webkit.org/show_bug.cgi?id=38016