- Revision
- 164440
- Author
- [email protected]
- Date
- 2014-02-20 11:40:28 -0800 (Thu, 20 Feb 2014)
Log Message
Rename RenderBlockFlow::clearFloats and RenderBlockFlow::newLine to be more accurate
https://bugs.webkit.org/show_bug.cgi?id=128991
Reviewed by David Hyatt.
Rename clearFloats to rebuildFloatingObjectSetFromIntrudingFloats
since it does just that.
Rename newLine to clearFloats because it actually does what the CSS
spec calls clearing floats. This also matches clearFloatsIfNeeded.
This also removes a FIXME comment that points to a bug that has
already been fixed.
This patch is based on a Blink patch by leviw:
https://src.chromium.org/viewvc/blink?revision=158598&view=revision
No new tests, no behavior change.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::clearFloats):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleFloat):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164439 => 164440)
--- trunk/Source/WebCore/ChangeLog 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/ChangeLog 2014-02-20 19:40:28 UTC (rev 164440)
@@ -1,3 +1,37 @@
+2014-02-20 Bem Jones-Bey <[email protected]>
+
+ Rename RenderBlockFlow::clearFloats and RenderBlockFlow::newLine to be more accurate
+ https://bugs.webkit.org/show_bug.cgi?id=128991
+
+ Reviewed by David Hyatt.
+
+ Rename clearFloats to rebuildFloatingObjectSetFromIntrudingFloats
+ since it does just that.
+
+ Rename newLine to clearFloats because it actually does what the CSS
+ spec calls clearing floats. This also matches clearFloatsIfNeeded.
+
+ This also removes a FIXME comment that points to a bug that has
+ already been fixed.
+
+ This patch is based on a Blink patch by leviw:
+ https://src.chromium.org/viewvc/blink?revision=158598&view=revision
+
+ No new tests, no behavior change.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
+ (WebCore::RenderBlockFlow::layoutBlock):
+ (WebCore::RenderBlockFlow::clearFloats):
+ * rendering/RenderBlockFlow.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::layoutRunsAndFloats):
+ (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+ * rendering/line/BreakingContextInlineHeaders.h:
+ (WebCore::BreakingContext::handleFloat):
+ * rendering/svg/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout):
+
2014-02-19 Pratik Solanki <[email protected]>
ASSERT in FrameLoader::shouldInterruptLoadForXFrameOptions
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (164439 => 164440)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-02-20 19:40:28 UTC (rev 164440)
@@ -203,7 +203,7 @@
RenderBox::willBeDestroyed();
}
-void RenderBlockFlow::clearFloats()
+void RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats()
{
if (m_floatingObjects)
m_floatingObjects->setHorizontalWritingMode(isHorizontalWritingMode());
@@ -351,7 +351,7 @@
if (updateLogicalWidthAndColumnWidth())
relayoutChildren = true;
- clearFloats();
+ rebuildFloatingObjectSetFromIntrudingFloats();
LayoutUnit previousHeight = logicalHeight();
// FIXME: should this start out as borderAndPaddingLogicalHeight() + scrollbarLogicalHeight(),
@@ -2355,7 +2355,7 @@
return true;
}
-void RenderBlockFlow::newLine(EClear clear)
+void RenderBlockFlow::clearFloats(EClear clear)
{
positionNewFloats();
// set y position
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (164439 => 164440)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.h 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h 2014-02-20 19:40:28 UTC (rev 164440)
@@ -67,7 +67,7 @@
// repopulates the list with any floats that intrude from previous siblings or parents. Floats that were added by
// descendants are gone when this call completes and will get added back later on after the children have gotten
// a relayout.
- void clearFloats();
+ void rebuildFloatingObjectSetFromIntrudingFloats();
// RenderBlockFlow always contains either lines or paragraphs. When the children are all blocks (e.g. paragraphs), we call layoutBlockChildren.
// When the children are are all inline (e.g., lines), we call layoutInlineChildren.
@@ -470,7 +470,7 @@
// Returns true if and only if it has positioned any floats.
bool positionNewFloats();
- void newLine(EClear);
+ void clearFloats(EClear);
virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const override;
virtual LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const override;
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (164439 => 164440)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-02-20 19:40:28 UTC (rev 164440)
@@ -1085,7 +1085,7 @@
if (lastObject->isBR()) {
EClear clear = lastObject->style().clear();
if (clear != CNONE)
- newLine(clear);
+ clearFloats(clear);
}
}
}
@@ -1421,7 +1421,7 @@
if (!layoutState.lineInfo().isEmpty()) {
layoutState.lineInfo().setFirstLine(false);
- newLine(lineBreaker.clear());
+ clearFloats(lineBreaker.clear());
}
if (m_floatingObjects && lastRootBox()) {
Modified: trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h (164439 => 164440)
--- trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h 2014-02-20 19:40:28 UTC (rev 164440)
@@ -341,8 +341,7 @@
FloatingObject* floatingObject = m_lineBreaker.insertFloatingObject(floatBox);
// check if it fits in the current line.
// If it does, position it now, otherwise, position
- // it after moving to next line (in newLine() func)
- // FIXME: Bug 110372: Properly position multiple stacked floats with non-rectangular shape outside.
+ // it after moving to next line (in clearFloats() func)
if (m_floatsFitOnLine && m_width.fitsOnLineExcludingTrailingWhitespace(m_block.logicalWidthForFloat(floatingObject))) {
m_lineBreaker.positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width);
if (m_lineBreak.renderer() == m_current.renderer()) {
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (164439 => 164440)
--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2014-02-20 19:40:04 UTC (rev 164439)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2014-02-20 19:40:28 UTC (rev 164440)
@@ -411,7 +411,7 @@
ASSERT(childrenInline());
LayoutUnit repaintLogicalTop = 0;
LayoutUnit repaintLogicalBottom = 0;
- clearFloats();
+ rebuildFloatingObjectSetFromIntrudingFloats();
layoutInlineChildren(true, repaintLogicalTop, repaintLogicalBottom);
if (m_needsReordering)