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

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

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
Patch Set: 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 | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderCombineText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBoxModelObject.cpp
diff --git a/sky/engine/core/rendering/RenderBoxModelObject.cpp b/sky/engine/core/rendering/RenderBoxModelObject.cpp
index 93b1cb8d2e6566ce65a6b585f8ae002a599dac80..be45be6e07e8dcc1ffc58709fbcbfedf75404066 100644
--- a/sky/engine/core/rendering/RenderBoxModelObject.cpp
+++ b/sky/engine/core/rendering/RenderBoxModelObject.cpp
@@ -127,7 +127,6 @@ void RenderBoxModelObject::updateFromStyle()
setHasBoxDecorationBackground(calculateHasBoxDecorations());
setInline(styleToUse->isDisplayInlineType());
setPositionState(styleToUse->position());
- setHorizontalWritingMode(styleToUse->isHorizontalWritingMode());
}
static LayoutSize accumulateInFlowPositionOffsets(const RenderObject* child)
@@ -2198,31 +2197,29 @@ void RenderBoxModelObject::clipBorderSideForComplexInnerPath(GraphicsContext* gr
void RenderBoxModelObject::getBorderEdgeInfo(BorderEdge edges[], const RenderStyle* style, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
{
- bool horizontal = style->isHorizontalWritingMode();
-
edges[BSTop] = BorderEdge(style->borderTopWidth(),
resolveColor(style, CSSPropertyBorderTopColor),
style->borderTopStyle(),
style->borderTopIsTransparent(),
- horizontal || includeLogicalLeftEdge);
+ true);
edges[BSRight] = BorderEdge(style->borderRightWidth(),
resolveColor(style, CSSPropertyBorderRightColor),
style->borderRightStyle(),
style->borderRightIsTransparent(),
- !horizontal || includeLogicalRightEdge);
+ includeLogicalRightEdge);
edges[BSBottom] = BorderEdge(style->borderBottomWidth(),
resolveColor(style, CSSPropertyBorderBottomColor),
style->borderBottomStyle(),
style->borderBottomIsTransparent(),
- horizontal || includeLogicalRightEdge);
+ true);
edges[BSLeft] = BorderEdge(style->borderLeftWidth(),
resolveColor(style, CSSPropertyBorderLeftColor),
style->borderLeftStyle(),
style->borderLeftIsTransparent(),
- !horizontal || includeLogicalLeftEdge);
+ includeLogicalLeftEdge);
}
bool RenderBoxModelObject::borderObscuresBackgroundEdge(const FloatSize& contextScale) const
@@ -2323,7 +2320,6 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
: s->getRoundedBorderFor(paintRect, includeLogicalLeftEdge, includeLogicalRightEdge);
bool hasBorderRadius = s->hasBorderRadius();
- bool isHorizontal = s->isHorizontalWritingMode();
bool hasOpaqueBackground = s->colorIncludingFallback(CSSPropertyBackgroundColor).alpha() == 255;
GraphicsContextStateSaver stateSaver(*context, false);
@@ -2422,16 +2418,10 @@ void RenderBoxModelObject::paintBoxShadow(const PaintInfo& info, const LayoutRec
// The inset shadow case.
GraphicsContext::Edges clippedEdges = GraphicsContext::NoEdge;
if (!includeLogicalLeftEdge) {
- if (isHorizontal)
- clippedEdges |= GraphicsContext::LeftEdge;
- else
- clippedEdges |= GraphicsContext::TopEdge;
+ clippedEdges |= GraphicsContext::LeftEdge;
}
if (!includeLogicalRightEdge) {
- if (isHorizontal)
- clippedEdges |= GraphicsContext::RightEdge;
- else
- clippedEdges |= GraphicsContext::BottomEdge;
+ clippedEdges |= GraphicsContext::RightEdge;
}
// TODO: support non-integer shadows - crbug.com/334828
context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowOffset), shadowBlur, shadowSpread, clippedEdges);
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderCombineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698