Not reviewed: rolling out a previous patch.
Fixed <rdar://problem/
5695439> Crash during GCController destructor on
quitting browser
Used svn merge to roll out r29603 because it introduced some crashes
on quit.
GC relies on static hash tables, so it's not safe to GC from a static
destructor, which might run after the static hash tables' destructors.
* bindings/js/GCController.cpp:
(WebCore::GCController::garbageCollectNow):
* bindings/js/GCController.h:
LayoutTests:
Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
Reviewed by Beth
* fast/inline/inline-padding-disables-text-quirk.html: Added.
* platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.checksum: Added.
* platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.png: Added.
* platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29649
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-01-18 David Hyatt <hyatt@apple.com>
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
+
+ Reviewed by Beth
+
+ * fast/inline/inline-padding-disables-text-quirk.html: Added.
+ * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.checksum: Added.
+ * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.png: Added.
+ * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.txt: Added.
+
2008-01-18 David Hyatt <hyatt@apple.com>
Updated results for http://bugs.webkit.org/show_bug.cgi?id=14975
--- /dev/null
+<HTML> \r
+<BODY> \r
+<div style="background: green; border-bottom: 1px solid black;">\r
+<span style="padding: 0 0 0 1px;"></span></div> \r
+<div>There should be a green block above this text</div> \r
+ </BODY> \r
+</HTML> \r
--- /dev/null
+5fee32327a27b0849c1c7261c9574f78
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x19 [bgcolor=#008000] [border: (1px solid #000000) none]
+ RenderInline {SPAN} at (0,0) size 1x18
+ RenderBlock {DIV} at (0,19) size 784x18
+ RenderText {#text} at (0,0) size 286x18
+ text run at (0,0) width 286: "There should be a green block above this text"
(WebCore::GCController::garbageCollectNow):
* bindings/js/GCController.h:
+2008-01-18 David Hyatt <hyatt@apple.com>
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
+
+ Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
+ empty inline cases work. Empty inlines on lines by themselves now set isLineEmpty to false so that
+ bidiReorderLine will get properly called. In addition, the "shrink boxes with no text children" quirk
+ needs to be disabled for inlines with padding, margins or borders.
+
+ Reviewed by Beth
+
+ Added fast/inline/inline-padding-disables-text-quirk.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+ (WebCore::InlineFlowBox::placeBoxesVertically):
+ (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::hasBordersPaddingOrMargin):
+ * rendering/bidi.cpp:
+ (WebCore::inlineFlowRequiresLineBox):
+ (WebCore::RenderBlock::findNextLineBreak):
+
2008-01-18 David Hyatt <hyatt@apple.com>
Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
}
else
setBaseline(object()->baselinePosition(m_firstLine, true));
- if (hasTextChildren() || strictMode) {
+ if (hasTextChildren() || object()->hasBordersPaddingOrMargin() || strictMode) {
int ascent = baseline();
int descent = height() - ascent;
if (maxAscent < ascent)
if (maxPositionBottom < curr->height())
maxPositionBottom = curr->height();
}
- else if (curr->hasTextChildren() || strictMode) {
+ else if (curr->hasTextChildren() || curr->object()->hasBordersPaddingOrMargin() || strictMode) {
int ascent = curr->baseline() - curr->yPos();
int descent = curr->height() - ascent;
if (maxAscent < ascent)
else if (curr->yPos() == PositionBottom)
curr->setYPos(y + maxHeight - curr->height());
else {
- if (!curr->hasTextChildren() && !strictMode)
+ if (!curr->hasTextChildren() && !curr->object()->hasBordersPaddingOrMargin() && !strictMode)
childAffectsTopBottomPos = false;
curr->setYPos(curr->yPos() + y + maxAscent - curr->baseline());
}
setHeight(font.ascent() + font.descent());
setYPos(yPos() + baseline() - font.ascent());
setBaseline(font.ascent());
- if (hasTextChildren() || strictMode) {
+ if (hasTextChildren() || object()->hasBordersPaddingOrMargin() || strictMode) {
selectionTop = min(selectionTop, yPos());
selectionBottom = max(selectionBottom, yPos() + height());
}
}
// See if we have text children. If not, then we need to shrink ourselves to fit on the line.
- if (!hasTextChildren()) {
+ if (!hasTextChildren() && !object()->hasBordersPaddingOrMargin()) {
if (yPos() < topPos)
setYPos(topPos);
if (yPos() + height() > bottomPos)
bool hasBoxDecorations() const { return m_paintBackground; }
bool mustRepaintBackgroundOrBorder() const;
+ bool hasBordersPaddingOrMargin() const { return borderLeft() != 0 || borderRight() != 0 || borderTop() != 0 || borderBottom() != 0 ||
+ paddingLeft() != 0 || paddingRight() != 0 || paddingTop() != 0 || paddingBottom() != 0 ||
+ marginLeft() != 0 || marginRight() != 0 || marginTop() != 0 || marginBottom() != 0; }
+
bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout; }
bool selfNeedsLayout() const { return m_needsLayout; }
bool posChildNeedsLayout() const { return m_posChildNeedsLayout; }
static bool inlineFlowRequiresLineBox(RenderObject* flow)
{
// FIXME: Right now, we only allow line boxes for inlines that are truly empty.
- // We need to fix this, though, because at the very least, inlines with only text
- // children that is all whitespace should should also have line boxes.
- if (!flow->isInlineFlow() || flow->firstChild())
- return false;
-
- bool hasPaddingOrMargin = !(flow->paddingLeft() == 0 && flow->paddingRight() == 0
- && flow->paddingTop() == 0 && flow->paddingBottom() == 0
- && flow->marginLeft() == 0 && flow->marginRight() == 0
- && flow->marginTop() == 0 && flow->marginBottom() == 0);
- if (flow->hasBoxDecorations() || hasPaddingOrMargin)
- return true;
-
- return false;
+ // We need to fix this, though, because at the very least, inlines containing only
+ // ignorable whitespace should should also have line boxes.
+ return flow->isInlineFlow() && !flow->firstChild() && flow->hasBordersPaddingOrMargin();
}
static inline bool requiresLineBox(BidiIterator& it)
// If this object is at the start of the line, we need to behave like list markers and
// start ignoring spaces.
if (inlineFlowRequiresLineBox(o)) {
+ isLineEmpty = false;
if (ignoringSpaces) {
trailingSpaceObject = 0;
addMidpoint(BidiIterator(0, o, 0)); // Stop ignoring spaces.