- Revision
- 204951
- Author
- [email protected]
- Date
- 2016-08-24 18:55:04 -0700 (Wed, 24 Aug 2016)
Log Message
ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=155700
<rdar://problem/27720727>
Reviewed by David Hyatt.
Source/WebCore:
RenderBox::m_minPreferredLogicalWidth/m_maxPreferredLogicalWidth don't need special initial value since
preferredLogicalWidthsDirty flag guards them. -1 as initial value can cause problems for renderers that don't
override RenderBox::computePreferredLogicalWidths().
Test: fast/ruby/assert-when-content-size-is-negative.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::dirtyLineBoxes):
(WebCore::RenderBox::deleteLineBoxWrapper):
* rendering/RenderBox.h:
LayoutTests:
* fast/ruby/assert-when-content-size-is-negative-expected.txt: Added.
* fast/ruby/assert-when-content-size-is-negative.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (204950 => 204951)
--- trunk/LayoutTests/ChangeLog 2016-08-25 01:42:44 UTC (rev 204950)
+++ trunk/LayoutTests/ChangeLog 2016-08-25 01:55:04 UTC (rev 204951)
@@ -1,3 +1,14 @@
+2016-08-24 Zalan Bujtas <[email protected]>
+
+ ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
+ https://bugs.webkit.org/show_bug.cgi?id=155700
+ <rdar://problem/27720727>
+
+ Reviewed by David Hyatt.
+
+ * fast/ruby/assert-when-content-size-is-negative-expected.txt: Added.
+ * fast/ruby/assert-when-content-size-is-negative.html: Added.
+
2016-08-24 Jiewen Tan <[email protected]>
Unreviewed, rebase iOS simulator WK1 fast/text tests
Added: trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative-expected.txt (0 => 204951)
--- trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative-expected.txt 2016-08-25 01:55:04 UTC (rev 204951)
@@ -0,0 +1,4 @@
+This tests that inline does not assert when its composite state changes.
+if (window.testRunner) testRunner.dumpAsText();
+* { display: inline-flex; flex-basis: 1; }
+PASS if no assert in debug.
Added: trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative.html (0 => 204951)
--- trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative.html (rev 0)
+++ trunk/LayoutTests/fast/ruby/assert-when-content-size-is-negative.html 2016-08-25 01:55:04 UTC (rev 204951)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that inline does not assert when its composite state changes.</title>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<style>
+* {
+ display: inline-flex;
+ flex-basis: 1;
+}
+</style>
+</head>
+<body>
+PASS if no assert in debug.
+<frameset></frameset>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (204950 => 204951)
--- trunk/Source/WebCore/ChangeLog 2016-08-25 01:42:44 UTC (rev 204950)
+++ trunk/Source/WebCore/ChangeLog 2016-08-25 01:55:04 UTC (rev 204951)
@@ -1,3 +1,23 @@
+2016-08-24 Zalan Bujtas <[email protected]>
+
+ ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
+ https://bugs.webkit.org/show_bug.cgi?id=155700
+ <rdar://problem/27720727>
+
+ Reviewed by David Hyatt.
+
+ RenderBox::m_minPreferredLogicalWidth/m_maxPreferredLogicalWidth don't need special initial value since
+ preferredLogicalWidthsDirty flag guards them. -1 as initial value can cause problems for renderers that don't
+ override RenderBox::computePreferredLogicalWidths().
+
+ Test: fast/ruby/assert-when-content-size-is-negative.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::RenderBox):
+ (WebCore::RenderBox::dirtyLineBoxes):
+ (WebCore::RenderBox::deleteLineBoxWrapper):
+ * rendering/RenderBox.h:
+
2016-08-24 Alex Christensen <[email protected]>
Import w3c URL tests
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (204950 => 204951)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2016-08-25 01:42:44 UTC (rev 204950)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2016-08-25 01:55:04 UTC (rev 204951)
@@ -144,9 +144,6 @@
RenderBox::RenderBox(Element& element, RenderStyle&& style, BaseTypeFlags baseTypeFlags)
: RenderBoxModelObject(element, WTFMove(style), baseTypeFlags)
- , m_minPreferredLogicalWidth(-1)
- , m_maxPreferredLogicalWidth(-1)
- , m_inlineBoxWrapper(nullptr)
{
setIsBox();
}
@@ -153,9 +150,6 @@
RenderBox::RenderBox(Document& document, RenderStyle&& style, BaseTypeFlags baseTypeFlags)
: RenderBoxModelObject(document, WTFMove(style), baseTypeFlags)
- , m_minPreferredLogicalWidth(-1)
- , m_maxPreferredLogicalWidth(-1)
- , m_inlineBoxWrapper(nullptr)
{
setIsBox();
}
@@ -2148,13 +2142,14 @@
void RenderBox::dirtyLineBoxes(bool fullLayout)
{
- if (m_inlineBoxWrapper) {
- if (fullLayout) {
- delete m_inlineBoxWrapper;
- m_inlineBoxWrapper = nullptr;
- } else
- m_inlineBoxWrapper->dirtyLineBoxes();
- }
+ if (!m_inlineBoxWrapper)
+ return;
+
+ if (fullLayout) {
+ delete m_inlineBoxWrapper;
+ m_inlineBoxWrapper = nullptr;
+ } else
+ m_inlineBoxWrapper->dirtyLineBoxes();
}
void RenderBox::positionLineBox(InlineElementBox& box)
@@ -2190,12 +2185,13 @@
void RenderBox::deleteLineBoxWrapper()
{
- if (m_inlineBoxWrapper) {
- if (!documentBeingDestroyed())
- m_inlineBoxWrapper->removeFromParent();
- delete m_inlineBoxWrapper;
- m_inlineBoxWrapper = nullptr;
- }
+ if (!m_inlineBoxWrapper)
+ return;
+
+ if (!documentBeingDestroyed())
+ m_inlineBoxWrapper->removeFromParent();
+ delete m_inlineBoxWrapper;
+ m_inlineBoxWrapper = nullptr;
}
LayoutRect RenderBox::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const
Modified: trunk/Source/WebCore/rendering/RenderBox.h (204950 => 204951)
--- trunk/Source/WebCore/rendering/RenderBox.h 2016-08-25 01:42:44 UTC (rev 204950)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2016-08-25 01:55:04 UTC (rev 204951)
@@ -734,7 +734,7 @@
LayoutUnit m_maxPreferredLogicalWidth;
// For inline replaced elements, the inline box that owns us.
- InlineElementBox* m_inlineBoxWrapper;
+ InlineElementBox* m_inlineBoxWrapper { nullptr };
// Our overflow information.
RefPtr<RenderOverflow> m_overflow;