[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:52:47 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c44d8c7a43f67bf95b1492bf7cf79843376cb088
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 22 23:25:23 2002 +0000
Fix slashdot. Make sure the KONQBLOCK hack just throws away
margins at the tops and bottoms of kids.
* khtml/css/html4.css:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 2cba80e..f500747 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,14 @@
2002-10-22 David Hyatt <hyatt at apple.com>
+ Fix slashdot. Make sure the KONQBLOCK hack just throws away
+ margins at the tops and bottoms of kids.
+
+ * khtml/css/html4.css:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+
+2002-10-22 David Hyatt <hyatt at apple.com>
+
Fix for left-hand-side of wired.com. A disturbingly basic
bug. I was applying a parent's margins to its children
when collapsing, even if the parent had a border/padding set
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2cba80e..f500747 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,14 @@
2002-10-22 David Hyatt <hyatt at apple.com>
+ Fix slashdot. Make sure the KONQBLOCK hack just throws away
+ margins at the tops and bottoms of kids.
+
+ * khtml/css/html4.css:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+
+2002-10-22 David Hyatt <hyatt at apple.com>
+
Fix for left-hand-side of wired.com. A disturbingly basic
bug. I was applying a parent's margins to its children
when collapsing, even if the parent had a border/padding set
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2cba80e..f500747 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,14 @@
2002-10-22 David Hyatt <hyatt at apple.com>
+ Fix slashdot. Make sure the KONQBLOCK hack just throws away
+ margins at the tops and bottoms of kids.
+
+ * khtml/css/html4.css:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+
+2002-10-22 David Hyatt <hyatt at apple.com>
+
Fix for left-hand-side of wired.com. A disturbingly basic
bug. I was applying a parent's margins to its children
when collapsing, even if the parent had a border/padding set
diff --git a/WebCore/khtml/css/html4.css b/WebCore/khtml/css/html4.css
index 4c4045f..9bce4fc 100644
--- a/WebCore/khtml/css/html4.css
+++ b/WebCore/khtml/css/html4.css
@@ -369,7 +369,7 @@ LI > DIV {
FORM {
display: block;
- margin: 0 0 1em 0;
+ margin: 0_qem 0 1em 0;
}
FIELDSET {
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 0d2b63c..6c85d68 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -354,7 +354,11 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
// we're positioned, floating, or a table cell.
bool canCollapseWithChildren = !isRoot() && !isHtml() && !isPositioned() &&
!isFloating() && !isTableCell() && (m_height == 0);
-
+
+ // Whether or not we are a quirky container, i.e., do we collapse away top and bottom
+ // margins in our container.
+ bool quirkContainer = isTableCell();
+
// Sometimes an element will be shoved down away from a previous sibling, e.g., when
// clearing to pass beyond a float. In this case, you don't need to collapse. This
// boolean is updated with each iteration through our child list to reflect whether
@@ -382,7 +386,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
bool bottomChildQuirk = false;
bool strictMode = (element()->getDocument()->parseMode() == DocumentImpl::Strict);
-
+
//kdDebug() << "RenderFlow::layoutBlockChildren " << prevMargin << endl;
// take care in case we inherited floats
@@ -451,9 +455,9 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
int negTop = child->maxTopMargin(false);
// XXX A hack we have to put in to deal with the fact
- // that KHTML incorrectly morphs inlines with blocks
- // inside them into blocks themselves.
- if (child->style()->display() == INLINE && child->marginTop())
+ // that KHTML morphs inlines with blocks
+ // inside them into blocks themselves. -dwh
+ if (!strictMode && child->style()->display() == INLINE && child->marginTop())
posTop = negTop = 0;
// See if the top margin is quirky. We only care if this child has
@@ -478,7 +482,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
m_topMarginQuirk = false;
}
- if (isTableCell() && topMarginContributor && (posTop-negTop))
+ if (quirkContainer && topMarginContributor && (posTop-negTop))
topChildQuirk = topQuirk;
int ypos = m_height;
@@ -500,7 +504,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
else {
if (!topMarginContributor ||
(!canCollapseWithChildren
- && (strictMode || !isTableCell() || !topChildQuirk)
+ && (strictMode || !quirkContainer || !topChildQuirk)
)) {
// We're collapsing with a previous sibling's margins and not
// with the top of the block.
@@ -514,9 +518,9 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
prevNegMargin = child->maxBottomMargin(false);
// XXX A hack we have to put in to deal with the fact
- // that KHTML incorrectly morphs inlines with blocks
+ // that KHTML morphs inlines with blocks
// inside them into blocks themselves.
- if (child->style()->display() == INLINE && child->marginBottom())
+ if (!strictMode && child->style()->display() == INLINE && child->marginBottom())
prevPosMargin = prevNegMargin = 0;
if (prevPosMargin-prevNegMargin)
@@ -606,7 +610,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
// If we can't collapse with children then go ahead and add in the bottom margins.
if (!topMarginContributor &&
(!canCollapseWithChildren
- && (strictMode || !isTableCell() || !bottomChildQuirk)
+ && (strictMode || !quirkContainer || !bottomChildQuirk)
))
m_height += prevPosMargin - prevNegMargin;
@@ -630,6 +634,12 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
m_bottomMarginQuirk = false;
}
+ if (element()->id() == ID__KONQBLOCK)
+ // Deal with the case where <forms> get wrapped in a KONQBLOCK.
+ // We want that form's bottom margin to actually disappear.
+ // Don't let any children affect a KONQBLOCK's margins.
+ m_maxBottomPosMargin = m_maxBottomNegMargin = m_maxTopPosMargin = m_maxTopNegMargin = 0;
+
setLayouted();
// kdDebug( 6040 ) << "layouted = " << layouted_ << endl;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list