Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 688223002: Get rid of isWritingModeRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index e5b4a3d1dcd7843227504e60a18be0594bb50bbf..ecfc21fc87ebedcdc1d27def1cf88d5f9cbe5154 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -1083,8 +1083,7 @@ void RenderBlock::addOverflowFromPositionedObjects()
bool RenderBlock::createsBlockFormattingContext() const
{
- return isInlineBlock() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
- || isWritingModeRoot() || isDocumentElement();
+ return isInlineBlock() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() || isDocumentElement();
}
void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* child)
@@ -1542,7 +1541,7 @@ bool RenderBlock::isSelectionRoot() const
if (isDocumentElement() || hasOverflowClip()
|| isPositioned() || isFloating()
|| isInlineBlock()
- || hasTransform() || hasMask() || isWritingModeRoot()
+ || hasTransform() || hasMask()
|| isFlexItemIncludingDeprecated())
return true;
@@ -2571,7 +2570,7 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
// We also give up on finding a baseline if we have a vertical scrollbar, or if we are scrolled
// vertically (e.g., an overflow:hidden block that has had scrollTop moved).
bool ignoreBaseline = (layer() && layer()->scrollableArea() && ((direction == HorizontalLine ? (layer()->scrollableArea()->verticalScrollbar() || layer()->scrollableArea()->scrollYOffset())
- : (layer()->scrollableArea()->horizontalScrollbar() || layer()->scrollableArea()->scrollXOffset())))) || isWritingModeRoot();
+ : (layer()->scrollableArea()->horizontalScrollbar() || layer()->scrollableArea()->scrollXOffset()))));
int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
@@ -2599,9 +2598,6 @@ LayoutUnit RenderBlock::minLineHeightForReplacedRenderer(bool isFirstLine, Layou
int RenderBlock::firstLineBoxBaseline() const
{
- if (isWritingModeRoot())
- return -1;
-
if (childrenInline()) {
if (firstLineBox())
return firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(firstRootBox()->baselineType());
@@ -2633,9 +2629,6 @@ int RenderBlock::inlineBlockBaseline(LineDirectionMode direction) const
int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
{
- if (isWritingModeRoot())
- return -1;
-
if (childrenInline()) {
if (!firstLineBox() && hasLineIfEmpty()) {
const FontMetrics& fontMetrics = firstLineStyle()->fontMetrics();
@@ -2934,40 +2927,24 @@ RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* par
LayoutUnit RenderBlock::collapsedMarginBeforeForChild(const RenderBox* child) const
{
- // If the child has the same directionality as we do, then we can just return its
- // collapsed margin.
- if (!child->isWritingModeRoot())
- return child->collapsedMarginBefore();
- return child->collapsedMarginAfter();
+ // FIXME(sky): Remove
+ return child->collapsedMarginBefore();
}
LayoutUnit RenderBlock::collapsedMarginAfterForChild(const RenderBox* child) const
{
- // If the child has the same directionality as we do, then we can just return its
- // collapsed margin.
- if (!child->isWritingModeRoot())
- return child->collapsedMarginAfter();
- return child->collapsedMarginBefore();
+ // FIXME(sky): Remove
+ return child->collapsedMarginAfter();
}
bool RenderBlock::hasMarginBeforeQuirk(const RenderBox* child) const
{
- // If the child has the same directionality as we do, then we can just return its
- // margin quirk.
- if (!child->isWritingModeRoot())
- return child->isRenderBlock() ? toRenderBlock(child)->hasMarginBeforeQuirk() : child->style()->hasMarginBeforeQuirk();
-
- return child->isRenderBlock() ? toRenderBlock(child)->hasMarginAfterQuirk() : child->style()->hasMarginAfterQuirk();
+ return child->isRenderBlock() ? toRenderBlock(child)->hasMarginBeforeQuirk() : child->style()->hasMarginBeforeQuirk();
}
bool RenderBlock::hasMarginAfterQuirk(const RenderBox* child) const
{
- // If the child has the same directionality as we do, then we can just return its
- // margin quirk.
- if (!child->isWritingModeRoot())
- return child->isRenderBlock() ? toRenderBlock(child)->hasMarginAfterQuirk() : child->style()->hasMarginAfterQuirk();
-
- return child->isRenderBlock() ? toRenderBlock(child)->hasMarginBeforeQuirk() : child->style()->hasMarginBeforeQuirk();
+ return child->isRenderBlock() ? toRenderBlock(child)->hasMarginAfterQuirk() : child->style()->hasMarginAfterQuirk();
}
const char* RenderBlock::renderName() const
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698