[webkit-changes] cvs commit: WebCore/khtml/rendering
render_form.cpp render_replaced.cpp
Timothy
thatcher at opensource.apple.com
Fri Nov 11 10:24:20 PST 2005
thatcher 05/11/11 10:24:20
Modified: . Tag: Safari-1-3-branch ChangeLog
khtml/rendering Tag: Safari-1-3-branch render_form.cpp
render_replaced.cpp
Log:
Merged fix from TOT to Safari-1-3-branch
2005-11-11 Beth Dakin <bdakin at apple.com>
Reviewed by Hyatt.
Fix for <rdar://problem/3952698> Function buttons do not display
properly with Telia Webmail (3488).
Replaced elements with a percentage width used to be given a minimum
width of 0. This caused buttons etc with width:100% to overlap when
they shouldn't. Textareas and text boxes are still given a minimum
width of 0 because they need slightly different behavior to match
WinIE. I filed <rdar://problem/4339518> to track this remaining problem.
* khtml/rendering/render_form.cpp:
(RenderLineEdit::calcMinMaxWidth): Still give text fields a m_minWidth of 0.
(RenderTextArea::calcMinMaxWidth): And textareas.
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::calcMinMaxWidth): Remove the check for width().isPercent()
when making m_minWidth 0.
Revision Changes Path
No revision
No revision
1.335.2.13 +24 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.335.2.12
retrieving revision 1.335.2.13
diff -u -r1.335.2.12 -r1.335.2.13
--- ChangeLog 11 Nov 2005 16:40:18 -0000 1.335.2.12
+++ ChangeLog 11 Nov 2005 18:24:14 -0000 1.335.2.13
@@ -1,3 +1,27 @@
+2005-11-11 Timothy Hatcher <timothy at apple.com>
+
+ Merged fix from TOT to Safari-1-3-branch
+
+ 2005-11-11 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Hyatt.
+
+ Fix for <rdar://problem/3952698> Function buttons do not display
+ properly with Telia Webmail (3488).
+
+ Replaced elements with a percentage width used to be given a minimum
+ width of 0. This caused buttons etc with width:100% to overlap when
+ they shouldn't. Textareas and text boxes are still given a minimum
+ width of 0 because they need slightly different behavior to match
+ WinIE. I filed <rdar://problem/4339518> to track this remaining problem.
+
+ * khtml/rendering/render_form.cpp:
+ (RenderLineEdit::calcMinMaxWidth): Still give text fields a m_minWidth of 0.
+ (RenderTextArea::calcMinMaxWidth): And textareas.
+ * khtml/rendering/render_replaced.cpp:
+ (RenderReplaced::calcMinMaxWidth): Remove the check for width().isPercent()
+ when making m_minWidth 0.
+
2005-11-10 Timothy Hatcher <timothy at apple.com>
Merged fix from TOT to Safari-1-3-branch
No revision
No revision
1.102.6.6 +14 -0 WebCore/khtml/rendering/render_form.cpp
Index: render_form.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_form.cpp,v
retrieving revision 1.102.6.5
retrieving revision 1.102.6.6
diff -u -r1.102.6.5 -r1.102.6.6
--- render_form.cpp 11 Nov 2005 16:40:30 -0000 1.102.6.5
+++ render_form.cpp 11 Nov 2005 18:24:18 -0000 1.102.6.6
@@ -624,6 +624,13 @@
setIntrinsicHeight( s.height() );
RenderFormElement::calcMinMaxWidth();
+
+ // FIXME: m_minWidth should not really be set to 0. If textfields
+ // have value text in them to begin with, then to match WinIE the
+ // field should only be as wide as the text. Setting m_minWidth to
+ // 0 also makes textfields with width:100% overlap.
+ if (style()->width().isPercent())
+ m_minWidth = 0;
}
void RenderLineEdit::setStyle(RenderStyle *s)
@@ -1558,6 +1565,13 @@
setIntrinsicHeight( size.height() );
RenderFormElement::calcMinMaxWidth();
+
+ // FIXME: m_minWidth should not really be set to 0. If textareas
+ // have value text in them to begin with, then to match WinIE the
+ // textarea should only be as wide as the text. Setting m_minWidth
+ // to 0 also makes textareas with width:100% overlap.
+ if (style()->width().isPercent())
+ m_minWidth = 0;
}
void RenderTextArea::setStyle(RenderStyle *s)
1.75.6.1 +2 -3 WebCore/khtml/rendering/render_replaced.cpp
Index: render_replaced.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_replaced.cpp,v
retrieving revision 1.75
retrieving revision 1.75.6.1
diff -u -r1.75 -r1.75.6.1
--- render_replaced.cpp 13 Mar 2005 17:29:34 -0000 1.75
+++ render_replaced.cpp 11 Nov 2005 18:24:18 -0000 1.75.6.1
@@ -98,11 +98,10 @@
#endif
int width = calcReplacedWidth() + paddingLeft() + paddingRight() + borderLeft() + borderRight();
- if (style()->width().isPercent() || (style()->width().isVariable() && style()->height().isPercent())) {
+ if (style()->width().isAuto() && style()->height().isPercent()) {
m_minWidth = 0;
m_maxWidth = width;
- }
- else
+ } else
m_minWidth = m_maxWidth = width;
setMinMaxKnown();
More information about the webkit-changes
mailing list