[webkit-changes] cvs commit: WebCore/khtml/rendering render_box.cpp
David
hyatt at opensource.apple.com
Thu Oct 27 02:00:33 PDT 2005
hyatt 05/10/27 02:00:32
Modified: . ChangeLog
khtml/rendering render_box.cpp
Log:
Fix for bug 5517, percentage height relative block inside a percentage height absolute
block did not stretch properly to fill the absolute block.
Also fixing box-sizing bugs in percentage height calculations. Recurrence in
calcPercentageHeight needed a content box adjustment.
Reviewed by mjs
fast/block/positioning/062.html
fast/box-sizing/percentage-test.html
fast/box-sizing/panels-one.html
fast/box-sizing/panels-two.html
* khtml/rendering/render_box.cpp:
(RenderBox::calcPercentageHeight):
Revision Changes Path
1.300 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -r1.299 -r1.300
--- ChangeLog 27 Oct 2005 08:07:55 -0000 1.299
+++ ChangeLog 27 Oct 2005 09:00:29 -0000 1.300
@@ -1,3 +1,21 @@
+2005-10-27 David Hyatt <hyatt at apple.com>
+
+ Fix for bug 5517, percentage height relative block inside a percentage height absolute
+ block did not stretch properly to fill the absolute block.
+
+ Also fixing box-sizing bugs in percentage height calculations. Recurrence in
+ calcPercentageHeight needed a content box adjustment.
+
+ Reviewed by mjs
+
+ fast/block/positioning/062.html
+ fast/box-sizing/percentage-test.html
+ fast/box-sizing/panels-one.html
+ fast/box-sizing/panels-two.html
+
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::calcPercentageHeight):
+
2005-10-27 Eric Seidel <eseidel at apple.com>
No review, SVG build fix only.
1.174 +6 -1 WebCore/khtml/rendering/render_box.cpp
Index: render_box.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_box.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- render_box.cpp 25 Oct 2005 20:54:27 -0000 1.173
+++ render_box.cpp 27 Oct 2005 09:00:32 -0000 1.174
@@ -1200,7 +1200,7 @@
result = cb->calcContentBoxHeight(cb->style()->height().value);
else if (cb->style()->height().isPercent())
// We need to recur and compute the percentage height for our containing block.
- result = cb->calcPercentageHeight(cb->style()->height());
+ result = cb->calcContentBoxHeight(cb->calcPercentageHeight(cb->style()->height()));
else if (cb->isCanvas() || (cb->isBody() && style()->htmlHacks())) {
// Don't allow this to affect the block' m_height member variable, since this
// can get called while the block is still laying out its kids.
@@ -1208,7 +1208,12 @@
cb->calcHeight();
result = cb->contentHeight();
cb->setHeight(oldHeight);
+ } else if (cb->isRoot() && isPositioned()) {
+ // Match the positioned objects behavior, which is that positioned objects will fill their viewport
+ // always. Note we could only hit this case by recurring into calcPercentageHeight on a positioned containing block.
+ result = cb->calcContentBoxHeight(cb->availableHeight());
}
+
if (result != -1) {
result = height.width(result);
if (includeBorderPadding) {
More information about the webkit-changes
mailing list