WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
15236
RenderTheme forces borders for MenulistButtonAppearance
https://bugs.webkit.org/show_bug.cgi?id=15236
Summary
RenderTheme forces borders for MenulistButtonAppearance
Matt Perry
Reported
2007-09-18 18:14:59 PDT
MenulistButtonAppearance, which appears to be used for styled select controls, is given a rounded border. This looks wrong in Windows when not using the "Safari" style theme, since Windows select dropdowns are square. Platforms need more control over how this control is drawn.
Attachments
make some methods virtual
(1.55 KB, patch)
2007-09-18 18:15 PDT
,
Matt Perry
aroben
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Matt Perry
Comment 1
2007-09-18 18:15:49 PDT
Created
attachment 16318
[details]
make some methods virtual This simple patch just makes a few methods virtual so that platforms can override them with custom behavior.
Adam Roben (:aroben)
Comment 2
2007-09-22 13:37:55 PDT
Comment on
attachment 16318
[details]
make some methods virtual I don't think this is the right way to go about this. If this change were made, the <select>s computedStyle would still include the border-radius properties, even though we wouldn't be honoring them. Instead, you should override adjustMenuListButtonStyle, which is already virtual.
Matt Perry
Comment 3
2007-09-27 15:26:46 PDT
Hmm, yes, you're right. Doing it this way results in the <select> being drawn as if its size included the border. However, adjustMenuListButtonStyle seems insufficient. The only way to prevent it from drawing the rounded border is to reset the border entirely, which is undesirable when the user explicitly sets a border. I think the real fix involves fixing RenderObject::paintBorder so that it doesn't attempt to draw rounded corners in all cases. (It only really makes sense on <select> controls that are styled the Mac way).
Adam Roben (:aroben)
Comment 4
2007-09-27 16:41:32 PDT
(In reply to
comment #3
)
> However, adjustMenuListButtonStyle seems insufficient. The only way to prevent > it from drawing the rounded border is to reset the border entirely, which is > undesirable when the user explicitly sets a border.
Perhaps we need to change html4.css, then.
> I think the real fix involves fixing RenderObject::paintBorder so that it > doesn't attempt to draw rounded corners in all cases. (It only really makes > sense on <select> controls that are styled the Mac way).
RenderObject::paintBorder does not always try to paint rounded borders: if (style->hasBorderRadius() && static_cast<unsigned>(w) >= static_cast<unsigned>(topLeft.width()) + static_cast<unsigned>(topRight.width()) && static_cast<unsigned>(w) >= static_cast<unsigned>(bottomLeft.width()) + static_cast<unsigned>(bottomRight.width()) && static_cast<unsigned>(h) >= static_cast<unsigned>(topLeft.height()) + static_cast<unsigned>(bottomLeft.height()) && static_cast<unsigned>(h) >= static_cast<unsigned>(topRight.height()) + static_cast<unsigned>(bottomRight.height())) renderRadii = true;
Matt Perry
Comment 5
2007-10-17 16:28:35 PDT
(In reply to
comment #4
)
> RenderObject::paintBorder does not always try to paint rounded borders: > > if (style->hasBorderRadius() && > static_cast<unsigned>(w) >= static_cast<unsigned>(topLeft.width()) + > static_cast<unsigned>(topRight.width()) && > static_cast<unsigned>(w) >= static_cast<unsigned>(bottomLeft.width()) + > static_cast<unsigned>(bottomRight.width()) && > static_cast<unsigned>(h) >= static_cast<unsigned>(topLeft.height()) + > static_cast<unsigned>(bottomLeft.height()) && > static_cast<unsigned>(h) >= static_cast<unsigned>(topRight.height()) + > static_cast<unsigned>(bottomRight.height())) > renderRadii = true; >
You're right again. I suppose resetting the border radius would achieve the effect I want. Closing as WORKSFORME.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug