Title: [249288] trunk/Source/WebCore
- Revision
- 249288
- Author
- [email protected]
- Date
- 2019-08-29 13:03:37 -0700 (Thu, 29 Aug 2019)
Log Message
[LFC][TFC] The table wrapper box is a block level box
https://bugs.webkit.org/show_bug.cgi?id=201229
<rdar://problem/54805515>
Reviewed by Antti Koivisto.
This is the anonymous box that we inject as the parent of the table caption/actual table box.
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::isFloatAvoider const):
(WebCore::Layout::Box::isBlockLevelBox const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249287 => 249288)
--- trunk/Source/WebCore/ChangeLog 2019-08-29 19:24:46 UTC (rev 249287)
+++ trunk/Source/WebCore/ChangeLog 2019-08-29 20:03:37 UTC (rev 249288)
@@ -1,3 +1,22 @@
+2019-08-29 Zalan Bujtas <[email protected]>
+
+ [LFC][TFC] The table wrapper box is a block level box
+ https://bugs.webkit.org/show_bug.cgi?id=201229
+ <rdar://problem/54805515>
+
+ Reviewed by Antti Koivisto.
+
+ This is the anonymous box that we inject as the parent of the table caption/actual table box.
+
+ * layout/FormattingContextGeometry.cpp:
+ (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
+ * layout/layouttree/LayoutBox.cpp:
+ (WebCore::Layout::Box::establishesBlockFormattingContext const):
+ (WebCore::Layout::Box::isFloatAvoider const):
+ (WebCore::Layout::Box::isBlockLevelBox const):
+
2019-08-29 Youenn Fablet <[email protected]>
Skip fetch event dispatching if no fetch event handler is added at script evaluation time
Modified: trunk/Source/WebCore/layout/FormattingContextGeometry.cpp (249287 => 249288)
--- trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2019-08-29 19:24:46 UTC (rev 249287)
+++ trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2019-08-29 20:03:37 UTC (rev 249288)
@@ -727,7 +727,7 @@
{
ASSERT(!layoutBox.replaced());
// TODO: Use complicated-case for document renderer for now (see BlockFormattingContext::Geometry::inFlowHeightAndMargin).
- ASSERT((layoutBox.isBlockLevelBox() && layoutBox.isInFlow() && !layoutBox.isOverflowVisible()) || layoutBox.isInlineBlockBox() || layoutBox.isFloatingPositioned() || layoutBox.isDocumentBox());
+ ASSERT((layoutBox.isBlockLevelBox() && layoutBox.isInFlow() && !layoutBox.isOverflowVisible()) || layoutBox.isInlineBlockBox() || layoutBox.isFloatingPositioned() || layoutBox.isDocumentBox() || layoutBox.isTableBox());
// 10.6.6 Complicated cases
//
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (249287 => 249288)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2019-08-29 19:24:46 UTC (rev 249287)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2019-08-29 20:03:37 UTC (rev 249288)
@@ -252,7 +252,7 @@
void BlockFormattingContext::computeEstimatedVerticalPositionForAncestors(const Box& layoutBox) const
{
// We only need to estimate margin top for float related layout (formatting context roots avoid floats).
- ASSERT(layoutBox.isFloatingPositioned() || layoutBox.hasFloatClear() || layoutBox.establishesBlockFormattingContext() || layoutBox.establishesInlineFormattingContext());
+ ASSERT(layoutBox.isFloatAvoider() || layoutBox.establishesInlineFormattingContext());
// In order to figure out whether a box should avoid a float, we need to know the final positions of both (ignore relative positioning for now).
// In block formatting context the final position for a normal flow box includes
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (249287 => 249288)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2019-08-29 19:24:46 UTC (rev 249287)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2019-08-29 20:03:37 UTC (rev 249288)
@@ -91,6 +91,9 @@
if (isBlockLevelBox() && !isOverflowVisible())
return true;
+ if (isTableWrapperBox())
+ return true;
+
return false;
}
@@ -176,7 +179,7 @@
bool Box::isFloatAvoider() const
{
- return establishesBlockFormattingContext() || isFloatingPositioned();
+ return establishesBlockFormattingContext() || establishesTableFormattingContext() || isFloatingPositioned() || hasFloatClear();
}
const Container* Box::containingBlock() const
@@ -276,7 +279,7 @@
{
// Block level elements generate block level boxes.
auto display = m_style.display();
- return display == DisplayType::Block || display == DisplayType::ListItem || (display == DisplayType::Table && !isTableWrapperBox());
+ return display == DisplayType::Block || display == DisplayType::ListItem || display == DisplayType::Table;
}
bool Box::isInlineLevelBox() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes