[webkit-changes] cvs commit: WebCore/khtml/rendering
render_block.cpp
Adele
adele at opensource.apple.com
Tue Jul 12 14:04:50 PDT 2005
adele 05/07/12 14:04:49
Modified: . Tag: Safari-1-3-branch ChangeLog
khtml/rendering Tag: Safari-1-3-branch render_block.cpp
Log:
Merge fix from TOT to Safari-1-3-branch
<rdar://problem/4164959>
2005-04-22 David Hyatt <hyatt at apple.com>
Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was
broken when negative margins were used and did not properly decrease the max width.
Reviewed by Maciej
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::calcBlockMinMaxWidth):
Revision Changes Path
No revision
No revision
1.4108.4.26 +15 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4108.4.25
retrieving revision 1.4108.4.26
diff -u -r1.4108.4.25 -r1.4108.4.26
--- ChangeLog 12 Jul 2005 20:58:41 -0000 1.4108.4.25
+++ ChangeLog 12 Jul 2005 21:04:40 -0000 1.4108.4.26
@@ -1,5 +1,20 @@
2005-07-12 Adele Peterson <adele at apple.com>
+ Merge fix from TOT to Safari-1-3-branch
+ <rdar://problem/4164959>
+
+ 2005-04-22 David Hyatt <hyatt at apple.com>
+
+ Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was
+ broken when negative margins were used and did not properly decrease the max width.
+
+ Reviewed by Maciej
+
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::calcBlockMinMaxWidth):
+
+2005-07-12 Adele Peterson <adele at apple.com>
+
Merged fix from TOT to Safari-1-3-branch
<rdar://problem/4164953>
No revision
No revision
1.179.6.1 +10 -6 WebCore/khtml/rendering/render_block.cpp
Index: render_block.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_block.cpp,v
retrieving revision 1.179
retrieving revision 1.179.6.1
diff -u -r1.179 -r1.179.6.1
--- render_block.cpp 23 Feb 2005 21:38:20 -0000 1.179
+++ render_block.cpp 12 Jul 2005 21:04:48 -0000 1.179.6.1
@@ -3084,12 +3084,10 @@
marginLeft += ml.value;
else if (ml.type == Percent)
marginLeft += child->marginLeft();
- marginLeft = kMax(0, marginLeft);
if (mr.type == Fixed)
marginRight += mr.value;
else if (mr.type == Percent)
marginRight += child->marginRight();
- marginRight = kMax(0, marginRight);
margin = marginLeft + marginRight;
int w = child->minWidth() + margin;
@@ -3104,10 +3102,12 @@
if (!child->isFloating()) {
if (child->avoidsFloats()) {
// Determine a left and right max value based off whether or not the floats can fit in the
- // margins of the object.
- int maxLeft = kMax(floatLeftWidth, marginLeft);
- int maxRight = kMax(floatRightWidth, marginRight);
+ // margins of the object. For negative margins, we will attempt to overlap the float if the negative margin
+ // is smaller than the float width.
+ int maxLeft = marginLeft > 0 ? kMax(floatLeftWidth, marginLeft) : floatLeftWidth + marginLeft;
+ int maxRight = marginRight > 0 ? kMax(floatRightWidth, marginRight) : floatRightWidth + marginRight;
w = child->maxWidth() + maxLeft + maxRight;
+ w = kMax(w, floatLeftWidth + floatRightWidth);
}
else
m_maxWidth = kMax(floatLeftWidth + floatRightWidth, m_maxWidth);
@@ -3147,7 +3147,11 @@
child = child->nextSibling();
}
-
+
+ // Always make sure these values are non-negative.
+ m_minWidth = kMax(0, m_minWidth);
+ m_maxWidth = kMax(0, m_maxWidth);
+
m_maxWidth = kMax(floatLeftWidth + floatRightWidth, m_maxWidth);
}
More information about the webkit-changes
mailing list