+2016-08-25 Zalan Bujtas <zalan@apple.com>
+
+ Infinite recursion crash in WebCore::RenderBlockFlow::layoutBlock
+ https://bugs.webkit.org/show_bug.cgi?id=139474
+ <rdar://problem/27705190>
+
+ Reviewed by David Hyatt.
+
+ * fast/multicol/assert-on-small-page-height-with-widow-expected.txt: Added.
+ * fast/multicol/assert-on-small-page-height-with-widow.html: Added.
+
2016-08-25 Johan K. Jensen <johan_jensen@apple.com>
Update the Resource Timing implementation
+2016-08-25 Zalan Bujtas <zalan@apple.com>
+
+ Infinite recursion crash in WebCore::RenderBlockFlow::layoutBlock
+ https://bugs.webkit.org/show_bug.cgi?id=139474
+ <rdar://problem/27705190>
+
+ Reviewed by David Hyatt.
+
+ We should just give up trying to avoid widow when the page is too small to break line.
+
+ Test: fast/multicol/assert-on-small-page-height-with-widow.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidowIfNeeded):
+ (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+ * rendering/RenderBlockFlow.h:
+
2016-08-24 Sam Weinig <sam@webkit.org>
Add the ability to override the implementation name of IDL enums and dictionaries
return false;
}
-
+
+static void clearShouldBreakAtLineToAvoidWidowIfNeeded(RenderBlockFlow& blockFlow)
+{
+ if (!blockFlow.shouldBreakAtLineToAvoidWidow())
+ return;
+ blockFlow.clearShouldBreakAtLineToAvoidWidow();
+ blockFlow.setDidBreakAtLineToAvoidWidow();
+}
+
void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta, bool& overflowsRegion, RenderFlowThread* flowThread)
{
// FIXME: Ignore anonymous inline blocks. Handle the delta already having been set because of
logicalBottom = intMinForLayoutUnit;
lineBox->computeReplacedAndTextLineTopAndBottom(logicalOffset, logicalBottom);
lineHeight = logicalBottom - logicalOffset;
- if (logicalOffset == intMaxForLayoutUnit || lineHeight > pageLogicalHeight)
- return; // Give up. We're genuinely too big even after excluding blank space and overflow.
+ if (logicalOffset == intMaxForLayoutUnit || lineHeight > pageLogicalHeight) {
+ // Give up. We're genuinely too big even after excluding blank space and overflow.
+ clearShouldBreakAtLineToAvoidWidowIfNeeded(*this);
+ return;
+ }
pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
}
int lineIndex = lineCount(lineBox);
if (remainingLogicalHeight < lineHeight || (shouldBreakAtLineToAvoidWidow() && lineBreakToAvoidWidow() == lineIndex)) {
- if (shouldBreakAtLineToAvoidWidow() && lineBreakToAvoidWidow() == lineIndex) {
- clearShouldBreakAtLineToAvoidWidow();
- setDidBreakAtLineToAvoidWidow();
- }
+ if (lineBreakToAvoidWidow() == lineIndex)
+ clearShouldBreakAtLineToAvoidWidowIfNeeded(*this);
// If we have a non-uniform page height, then we have to shift further possibly.
if (!hasUniformPageLogicalHeight && !pushToNextPageWithMinimumLogicalHeight(remainingLogicalHeight, logicalOffset, lineHeight))
return;