[webkit-changes] cvs commit: WebCore/khtml/rendering
render_theme_mac.mm
David
hyatt at opensource.apple.com
Wed Jul 27 11:55:40 PDT 2005
hyatt 05/07/27 11:55:40
Modified: . ChangeLog
khtml/html html_formimpl.cpp
khtml/rendering render_theme_mac.mm
Log:
Remove the "enforce a square size" rule for checkboxes. WinIE
doesn't do this, and I'm not sure where I came up with it.
Fix a bug in isFocusable that was causing disabled form
controls with no corresponding widget to still get focus!
(This bug affected my new checkbox but also <input type=image>
and the HTML4 button!)
Reviewed by ggaren
* khtml/html/html_formimpl.cpp:
* khtml/rendering/render_theme_mac.mm:
Revision Changes Path
1.4478 +15 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4477
retrieving revision 1.4478
diff -u -r1.4477 -r1.4478
--- ChangeLog 27 Jul 2005 18:22:14 -0000 1.4477
+++ ChangeLog 27 Jul 2005 18:55:36 -0000 1.4478
@@ -1,3 +1,18 @@
+2005-07-27 David Hyatt <hyatt at apple.com>
+
+ Remove the "enforce a square size" rule for checkboxes. WinIE
+ doesn't do this, and I'm not sure where I came up with it.
+
+ Fix a bug in isFocusable that was causing disabled form
+ controls with no corresponding widget to still get focus!
+ (This bug affected my new checkbox but also <input type=image>
+ and the HTML4 button!)
+
+ Reviewed by ggaren
+
+ * khtml/html/html_formimpl.cpp:
+ * khtml/rendering/render_theme_mac.mm:
+
2005-07-27 Geoffrey Garen <ggaren at apple.com>
-added testcase for http://bugzilla.opendarwin.org/show_bug.cgi?id=3759
Date object enhancements
1.178 +3 -1 WebCore/khtml/html/html_formimpl.cpp
Index: html_formimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -r1.177 -r1.178
--- html_formimpl.cpp 27 Jul 2005 01:12:27 -0000 1.177
+++ html_formimpl.cpp 27 Jul 2005 18:55:39 -0000 1.178
@@ -1004,7 +1004,9 @@
bool HTMLGenericFormElementImpl::isFocusable() const
{
- if (!m_render || (m_render->style() && m_render->style()->visibility() != VISIBLE) || m_render->width() == 0 || m_render->height() == 0)
+ if (disabled() || !m_render ||
+ (m_render->style() && m_render->style()->visibility() != VISIBLE) ||
+ m_render->width() == 0 || m_render->height() == 0)
return false;
return true;
}
1.3 +7 -11 WebCore/khtml/rendering/render_theme_mac.mm
Index: render_theme_mac.mm
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_theme_mac.mm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- render_theme_mac.mm 27 Jul 2005 01:12:28 -0000 1.2
+++ render_theme_mac.mm 27 Jul 2005 18:55:40 -0000 1.3
@@ -139,8 +139,10 @@
void RenderThemeMac::setSizeFromFont(RenderStyle* style, const int* sizes) const
{
int size = sizes[controlSizeForFont(style)];
- style->setWidth(Length(size, Fixed));
- style->setHeight(Length(size, Fixed));
+ if (style->width().isVariable())
+ style->setWidth(Length(size, Fixed));
+ if (style->height().isVariable())
+ style->setHeight(Length(size, Fixed));
}
void RenderThemeMac::setControlSize(NSCell* cell, const int* sizes, int minSize)
@@ -212,15 +214,9 @@
if (!style->width().isVariable() && !style->height().isVariable())
return;
- // The control is a square, so make the two values match.
- if (!style->width().isVariable())
- style->setHeight(style->width());
- else if (!style->height().isVariable())
- style->setWidth(style->width());
- else
- // Use the font size to determine the intrinsic width of the control.
- // Checkboxes are either 14, 12, or 10 pixels tall.
- setSizeFromFont(style, checkboxSizes());
+ // Use the font size to determine the intrinsic width of the control.
+ // Checkboxes are either 14, 12, or 10 pixels tall.
+ setSizeFromFont(style, checkboxSizes());
}
void RenderThemeMac::setCheckboxCellState(const RenderObject* o, const QRect& r)
More information about the webkit-changes
mailing list