[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 13:54:18 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit cb302565a7386f05d9d47f05d3591af64d8cc9b1
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 29 05:59:55 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46782, rename the top and bottom margin quirk getters/setters.
Reviewed by Maciej Stachowiak.
Also do a bit of cleanup for block flow roots. Make sure they don't try to propagate overhanging floats out
to ancestors.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::setCollapsedBottomMargin):
(WebCore::RenderBlock::addOverhangingFloats):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
* rendering/RenderObject.h:
(WebCore::RenderObject::isMarginBeforeQuirk):
(WebCore::RenderObject::isMarginAfterQuirk):
(WebCore::RenderObject::setMarginBeforeQuirk):
(WebCore::RenderObject::setMarginAfterQuirk):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ac66d2a..a52cc9b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,27 @@
2010-09-28 David Hyatt <hyatt at apple.com>
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46782, rename the top and bottom margin quirk getters/setters.
+
+ Also do a bit of cleanup for block flow roots. Make sure they don't try to propagate overhanging floats out
+ to ancestors.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::collapseMargins):
+ (WebCore::RenderBlock::setCollapsedBottomMargin):
+ (WebCore::RenderBlock::addOverhangingFloats):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::RenderObject):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isMarginBeforeQuirk):
+ (WebCore::RenderObject::isMarginAfterQuirk):
+ (WebCore::RenderObject::setMarginBeforeQuirk):
+ (WebCore::RenderObject::setMarginAfterQuirk):
+
+2010-09-28 David Hyatt <hyatt at apple.com>
+
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=46780
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index cbef15e..d20285b 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1175,8 +1175,8 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
if (!isCell) {
initMaxMarginValues();
- setTopMarginQuirk(style()->marginTop().quirk());
- setBottomMarginQuirk(style()->marginBottom().quirk());
+ setMarginBeforeQuirk(style()->marginBefore().quirk());
+ setMarginAfterQuirk(style()->marginAfter().quirk());
Node* n = node();
if (n && n->hasTagName(formTag) && static_cast<HTMLFormElement*>(n)->isMalformed()) {
@@ -1479,7 +1479,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
// See if the top margin is quirky. We only care if this child has
// margins that will collapse with us.
- bool topQuirk = child->isTopMarginQuirk() || style()->marginBeforeCollapse() == MDISCARD;
+ bool topQuirk = child->isMarginBeforeQuirk() || style()->marginBeforeCollapse() == MDISCARD;
if (marginInfo.canCollapseWithMarginBefore()) {
// This child is collapsing with the top of the
@@ -1493,7 +1493,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
// has an example of this, a <dt> with 0.8em author-specified inside
// a <dl> inside a <td>.
if (!marginInfo.determinedMarginBeforeQuirk() && !topQuirk && (posTop-negTop)) {
- setTopMarginQuirk(false);
+ setMarginBeforeQuirk(false);
marginInfo.setDeterminedMarginBeforeQuirk(true);
}
@@ -1503,7 +1503,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
// This deals with the <td><div><p> case.
// Don't do this for a block that split two inlines though. You do
// still apply margins in this case.
- setTopMarginQuirk(true);
+ setMarginBeforeQuirk(true);
}
if (marginInfo.quirkContainer() && marginInfo.atBeforeSideOfBlock() && (posTop - negTop))
@@ -1549,7 +1549,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
marginInfo.setNegMargin(child->maxMarginAfter(NegativeMargin));
if (marginInfo.margin())
- marginInfo.setMarginAfterQuirk(child->isBottomMarginQuirk() || style()->marginAfterCollapse() == MDISCARD);
+ marginInfo.setMarginAfterQuirk(child->isMarginAfterQuirk() || style()->marginAfterCollapse() == MDISCARD);
}
// If margins would pull us past the top of the next page, then we need to pull back and pretend like the margins
@@ -1703,13 +1703,13 @@ void RenderBlock::setCollapsedBottomMargin(const MarginInfo& marginInfo)
setMaxMarginAfterValues(max(maxPosMarginAfter(), marginInfo.posMargin()), max(maxNegMarginAfter(), marginInfo.negMargin()));
if (!marginInfo.marginAfterQuirk())
- setBottomMarginQuirk(false);
+ setMarginAfterQuirk(false);
if (marginInfo.marginAfterQuirk() && marginBottom() == 0)
// We have no bottom margin and our last child has a quirky margin.
// We will pick up this quirky margin and pass it through.
// This deals with the <td><div><p> case.
- setBottomMarginQuirk(true);
+ setMarginAfterQuirk(true);
}
}
@@ -3734,7 +3734,7 @@ void RenderBlock::clearFloats()
int RenderBlock::addOverhangingFloats(RenderBlock* child, int xoff, int yoff, bool makeChildPaintOtherFloats)
{
// Prevent floats from being added to the canvas by the root element, e.g., <html>.
- if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns())
+ if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns() || child->isBlockFlowRoot())
return 0;
int lowestFloatBottom = 0;
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index fd0b394..9e86dd8 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -209,8 +209,8 @@ RenderObject::RenderObject(Node* node)
, m_hasCounterNodeMap(false)
, m_everHadLayout(false)
, m_childrenInline(false)
- , m_topMarginQuirk(false)
- , m_bottomMarginQuirk(false)
+ , m_marginBeforeQuirk(false)
+ , m_marginAfterQuirk(false)
, m_hasMarkupTruncation(false)
, m_selectionState(SelectionNone)
, m_hasColumns(false)
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index 5997ac9..70b0da5 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -688,10 +688,10 @@ public:
*/
virtual IntRect localCaretRect(InlineBox*, int caretOffset, int* extraWidthToEndOfLine = 0);
- bool isTopMarginQuirk() const { return m_topMarginQuirk; }
- bool isBottomMarginQuirk() const { return m_bottomMarginQuirk; }
- void setTopMarginQuirk(bool b = true) { m_topMarginQuirk = b; }
- void setBottomMarginQuirk(bool b = true) { m_bottomMarginQuirk = b; }
+ bool isMarginBeforeQuirk() const { return m_marginBeforeQuirk; }
+ bool isMarginAfterQuirk() const { return m_marginAfterQuirk; }
+ void setMarginBeforeQuirk(bool b = true) { m_marginBeforeQuirk = b; }
+ void setMarginAfterQuirk(bool b = true) { m_marginAfterQuirk = b; }
// When performing a global document tear-down, the renderer of the document is cleared. We use this
// as a hook to detect the case of document destruction and don't waste time doing unnecessary work.
@@ -841,8 +841,8 @@ private:
// These bitfields are moved here from subclasses to pack them together
// from RenderBlock
bool m_childrenInline : 1;
- bool m_topMarginQuirk : 1;
- bool m_bottomMarginQuirk : 1;
+ bool m_marginBeforeQuirk : 1;
+ bool m_marginAfterQuirk : 1;
bool m_hasMarkupTruncation : 1;
unsigned m_selectionState : 3; // SelectionState
bool m_hasColumns : 1;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list