- Revision
- 231897
- Author
- za...@apple.com
- Date
- 2018-05-17 08:24:00 -0700 (Thu, 17 May 2018)
Log Message
[LFC] Replace ASSERT_NOT_REACHED with ASSERT_NOT_IMPLEMENTED_YET where applicable.
https://bugs.webkit.org/show_bug.cgi?id=185728
Reviewed by Antti Koivisto.
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): leftover from previous patch.
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
(WebCore::Layout::FormattingContext::computeReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::styleChanged):
(WebCore::Layout::LayoutContext::formattingContext):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedWidth const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
(WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createSubTree):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231896 => 231897)
--- trunk/Source/WebCore/ChangeLog 2018-05-17 14:29:46 UTC (rev 231896)
+++ trunk/Source/WebCore/ChangeLog 2018-05-17 15:24:00 UTC (rev 231897)
@@ -1,5 +1,30 @@
2018-05-17 Zalan Bujtas <za...@apple.com>
+ [LFC] Replace ASSERT_NOT_REACHED with ASSERT_NOT_IMPLEMENTED_YET where applicable.
+ https://bugs.webkit.org/show_bug.cgi?id=185728
+
+ Reviewed by Antti Koivisto.
+
+ * layout/FormattingContext.cpp:
+ (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): leftover from previous patch.
+ (WebCore::Layout::FormattingContext::computeFloatingWidth const):
+ (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
+ (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
+ (WebCore::Layout::FormattingContext::computeReplacedWidth const):
+ (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
+ (WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
+ * layout/LayoutContext.cpp:
+ (WebCore::Layout::LayoutContext::styleChanged):
+ (WebCore::Layout::LayoutContext::formattingContext):
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedWidth const):
+ (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
+ (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
+ * layout/layouttree/LayoutTreeBuilder.cpp:
+ (WebCore::Layout::TreeBuilder::createSubTree):
+
+2018-05-17 Zalan Bujtas <za...@apple.com>
+
[LFC] Move replaced logic from Layout::Box to Layout::Replaced class
https://bugs.webkit.org/show_bug.cgi?id=185711
Modified: trunk/Source/WebCore/layout/FormattingContext.cpp (231896 => 231897)
--- trunk/Source/WebCore/layout/FormattingContext.cpp 2018-05-17 14:29:46 UTC (rev 231896)
+++ trunk/Source/WebCore/layout/FormattingContext.cpp 2018-05-17 15:24:00 UTC (rev 231897)
@@ -84,13 +84,13 @@
computeOutOfFlowNonReplacedWidth(layoutContext, layoutBox, displayBox);
return;
}
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
}
void FormattingContext::computeFloatingWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
if (!layoutBox.replaced()) {
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
return;
}
computeReplacedWidth(layoutContext, layoutBox, displayBox);
@@ -102,7 +102,7 @@
computeOutOfFlowNonReplacedHeight(layoutContext, layoutBox, displayBox);
return;
}
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
}
void FormattingContext::computeFloatingHeight(const Box&, Display::Box&) const
@@ -154,7 +154,7 @@
void FormattingContext::computeOutOfFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.isReplaced());
+ ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced());
// 10.6.4 Absolutely positioned, non-replaced elements
//
@@ -214,7 +214,7 @@
void FormattingContext::computeReplacedWidth(LayoutContext&, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT((layoutBox.isOutOfFlowPositioned() || layoutBox.isFloatingPositioned() || layoutBox.isInFlow()) && layoutBox.isReplaced());
+ ASSERT((layoutBox.isOutOfFlowPositioned() || layoutBox.isFloatingPositioned() || layoutBox.isInFlow()) && layoutBox.replaced());
// 10.3.4 Block-level, replaced elements in normal flow: The used value of 'width' is determined as for inline replaced elements.
// 10.3.6 Floating, replaced elements: The used value of 'width' is determined as for inline replaced elements.
@@ -254,7 +254,7 @@
} else if (width.isAuto() && height.isAuto() && replaced->hasIntrinsicRatio()) {
// #3
// FIXME: undefined but surely doable.
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
} else if (width.isAuto() && replaced->hasIntrinsicWidth()) {
// #4
computedWidthValue = replaced->intrinsicWidth();
@@ -297,7 +297,7 @@
void FormattingContext::computeOutOfFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.isReplaced());
+ ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced());
// 10.3.7 Absolutely positioned, non-replaced elements
//
@@ -351,7 +351,7 @@
void FormattingContext::computeOutOfFlowReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT(layoutBox.isOutOfFlowPositioned() && layoutBox.isReplaced());
+ ASSERT(layoutBox.isOutOfFlowPositioned() && layoutBox.replaced());
// 10.3.8 Absolutely positioned, replaced elements
//
// The used value of 'width' is determined as for inline replaced elements.
Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (231896 => 231897)
--- trunk/Source/WebCore/layout/LayoutContext.cpp 2018-05-17 14:29:46 UTC (rev 231896)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp 2018-05-17 15:24:00 UTC (rev 231897)
@@ -79,7 +79,7 @@
else if (is<InlineFormattingState>(formattingState))
invalidationRoot = InlineInvalidation::invalidate(layoutBox, styleDiff, *this, downcast<InlineFormattingState>(formattingState)).root;
else
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
ASSERT(invalidationRoot);
m_formattingContextRootListForLayout.addVoid(invalidationRoot);
}
@@ -110,7 +110,7 @@
if (formattingContextRoot.establishesInlineFormattingContext())
return std::make_unique<InlineFormattingContext>(formattingContextRoot);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
return nullptr;
}
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (231896 => 231897)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-05-17 14:29:46 UTC (rev 231896)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-05-17 15:24:00 UTC (rev 231897)
@@ -154,7 +154,7 @@
void BlockFormattingContext::computeInFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT(layoutBox.isInFlow() && !layoutBox.isReplaced());
+ ASSERT(layoutBox.isInFlow() && !layoutBox.replaced());
// 10.3.3 Block-level, non-replaced elements in normal flow
// The following constraints must hold among the used values of the other properties:
@@ -189,7 +189,7 @@
computeInFlowNonReplacedHeight(layoutContext, layoutBox, displayBox);
return;
}
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
}
LayoutUnit BlockFormattingContext::marginTop(const Box& layoutBox) const
@@ -204,7 +204,7 @@
void BlockFormattingContext::computeInFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const
{
- ASSERT(layoutBox.isInFlow() && !layoutBox.isReplaced());
+ ASSERT(layoutBox.isInFlow() && !layoutBox.replaced());
// https://www.w3.org/TR/CSS22/visudet.html
// If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders:
Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (231896 => 231897)
--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2018-05-17 14:29:46 UTC (rev 231896)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2018-05-17 15:24:00 UTC (rev 231897)
@@ -63,7 +63,7 @@
box = new InlineContainer(RenderStyle::clone(child.style()));
createSubTree(child, downcast<Container>(*box));
} else
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_IMPLEMENTED_YET();
if (!rootContainer.hasChild()) {
rootContainer.setFirstChild(*box);