[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:27:16 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9b30b0a3640633d1c00e2d7b1d920d6cbcad1794
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jul 25 07:41:28 2002 +0000
Fix for bug 2992158, the calendar on www.blog.org in the upper
right was shoved offscreen (and causing a horizontal scrollbar
to be necessary). KHTML was not recomputing the margins for
the table when it became displaced by the float. It was also
mispositioning the float itself.
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::addOverHangingFloats):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a10767d..40ba95e 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-07-25 David Hyatt <hyatt at apple.com>
+
+ Fix for bug 2992158, the calendar on www.blog.org in the upper
+ right was shoved offscreen (and causing a horizontal scrollbar
+ to be necessary). KHTML was not recomputing the margins for
+ the table when it became displaced by the float. It was also
+ mispositioning the float itself.
+
+ * khtml/rendering/render_box.h:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+ (RenderFlow::addOverHangingFloats):
+
2002-07-24 David Hyatt <hyatt at apple.com>
Fix for bug 2953423, viamichelin.com lays out incorrectly.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a10767d..40ba95e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-07-25 David Hyatt <hyatt at apple.com>
+
+ Fix for bug 2992158, the calendar on www.blog.org in the upper
+ right was shoved offscreen (and causing a horizontal scrollbar
+ to be necessary). KHTML was not recomputing the margins for
+ the table when it became displaced by the float. It was also
+ mispositioning the float itself.
+
+ * khtml/rendering/render_box.h:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+ (RenderFlow::addOverHangingFloats):
+
2002-07-24 David Hyatt <hyatt at apple.com>
Fix for bug 2953423, viamichelin.com lays out incorrectly.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a10767d..40ba95e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-07-25 David Hyatt <hyatt at apple.com>
+
+ Fix for bug 2992158, the calendar on www.blog.org in the upper
+ right was shoved offscreen (and causing a horizontal scrollbar
+ to be necessary). KHTML was not recomputing the margins for
+ the table when it became displaced by the float. It was also
+ mispositioning the float itself.
+
+ * khtml/rendering/render_box.h:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::layoutBlockChildren):
+ (RenderFlow::addOverHangingFloats):
+
2002-07-24 David Hyatt <hyatt at apple.com>
Fix for bug 2953423, viamichelin.com lays out incorrectly.
diff --git a/WebCore/khtml/rendering/render_box.h b/WebCore/khtml/rendering/render_box.h
index 62fe790..bfcf53a 100644
--- a/WebCore/khtml/rendering/render_box.h
+++ b/WebCore/khtml/rendering/render_box.h
@@ -71,6 +71,12 @@ public:
virtual void setWidth( int width ) { m_width = width; }
virtual void setHeight( int height ) { m_height = height; }
+ // This method is now public so that centered objects like tables that are
+ // shifted right by left-aligned floats can recompute their left and
+ // right margins (so that they can remain centered after being
+ // shifted. -dwh
+ void calcHorizontalMargins(const Length& ml, const Length& mr, int cw);
+
virtual void position(int x, int y, int from, int len, int width, bool reverse, bool firstLine, int);
virtual int lowestPosition() const;
@@ -106,8 +112,6 @@ protected:
void calcAbsoluteHorizontal();
void calcAbsoluteVertical();
- void calcHorizontalMargins(const Length& ml, const Length& mr, int cw);
-
void calcClip(QPainter* p, int tx, int ty);
// the actual height of the contents + borders + padding
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 4e66708..61217b9 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -446,8 +446,26 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
if(style()->direction() == LTR) {
// html blocks flow around floats
- if ( ( style()->htmlHacks() || child->isTable() ) && child->style()->flowAroundFloats() )
- chPos = leftOffset(m_height) + child->marginLeft();
+ if ( ( style()->htmlHacks() || child->isTable() ) && child->style()->flowAroundFloats() ) {
+ int leftOff = leftOffset(m_height);
+ if (leftOff != xPos) {
+ // The object is shifting right. The object might be centered, so we need to
+ // recalculate our horizontal margins. Note that the containing block content
+ // width computation will take into account the delta between |leftOff| and |xPos|
+ // so that we can just pass the content width in directly to the |calcHorizontalMargins|
+ // function.
+ // -dwh
+ int cw;
+ RenderObject *cb = child->containingBlock();
+ if ( cb->isFlow() )
+ cw = static_cast<RenderFlow *>(cb)->lineWidth( child->yPos() );
+ else
+ cw = cb->contentWidth();
+ static_cast<RenderBox*>(child)->calcHorizontalMargins(child->style()->marginLeft(), child->style()->marginRight(),
+ cw);
+ chPos = leftOff + child->marginLeft();
+ }
+ }
} else {
chPos -= child->width() + child->marginLeft() + child->marginRight();
if ( ( style()->htmlHacks() || child->isTable() ) && child->style()->flowAroundFloats() )
@@ -1010,7 +1028,12 @@ void RenderFlow::addOverHangingFloats( RenderFlow *flow, int xoff, int offset, b
special->startY = r->startY - offset;
special->endY = r->endY - offset;
special->left = r->left - xoff;
- if (flow != parent())
+ // Applying the child's margin makes no sense in the case where the child was passed in.
+ // since his own margin was added already through the subtraction of the |xoff| variable
+ // above. |xoff| will equal -flow->marginLeft() in this case, so it's already been taken
+ // into account. Only apply this code if |child| is false, since otherwise the left margin
+ // will get applied twice. -dwh
+ if (!child && flow != parent())
special->left += flow->marginLeft();
if ( !child ) {
special->left -= marginLeft();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list