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

Unified Diff: sky/engine/platform/geometry/RoundedRect.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/platform/geometry/RoundedRect.h ('k') | sky/engine/platform/text/WritingMode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/geometry/RoundedRect.cpp
diff --git a/sky/engine/platform/geometry/RoundedRect.cpp b/sky/engine/platform/geometry/RoundedRect.cpp
index f7d304357618c58209a0dd8116dd26d47003c05e..35821450ba4fb2c837cac4a97e2e59224ae380bb 100644
--- a/sky/engine/platform/geometry/RoundedRect.cpp
+++ b/sky/engine/platform/geometry/RoundedRect.cpp
@@ -94,44 +94,19 @@ void RoundedRect::inflateWithRadii(int size)
m_radii.scale(factor);
}
-void RoundedRect::Radii::includeLogicalEdges(const RoundedRect::Radii& edges, bool isHorizontal, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
+void RoundedRect::Radii::includeLogicalEdges(const RoundedRect::Radii& edges, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
{
if (includeLogicalLeftEdge) {
- if (isHorizontal)
- m_bottomLeft = edges.bottomLeft();
- else
- m_topRight = edges.topRight();
+ m_bottomLeft = edges.bottomLeft();
m_topLeft = edges.topLeft();
}
if (includeLogicalRightEdge) {
- if (isHorizontal)
- m_topRight = edges.topRight();
- else
- m_bottomLeft = edges.bottomLeft();
+ m_topRight = edges.topRight();
m_bottomRight = edges.bottomRight();
}
}
-void RoundedRect::Radii::excludeLogicalEdges(bool isHorizontal, bool excludeLogicalLeftEdge, bool excludeLogicalRightEdge)
-{
- if (excludeLogicalLeftEdge) {
- if (isHorizontal)
- m_bottomLeft = IntSize();
- else
- m_topRight = IntSize();
- m_topLeft = IntSize();
- }
-
- if (excludeLogicalRightEdge) {
- if (isHorizontal)
- m_topRight = IntSize();
- else
- m_bottomLeft = IntSize();
- m_bottomRight = IntSize();
- }
-}
-
RoundedRect::RoundedRect(int x, int y, int width, int height)
: m_rect(x, y, width, height)
{
@@ -159,14 +134,9 @@ IntRect RoundedRect::radiusCenterRect() const
return IntRect(minX, minY, maxX - minX, maxY - minY);
}
-void RoundedRect::includeLogicalEdges(const Radii& edges, bool isHorizontal, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
-{
- m_radii.includeLogicalEdges(edges, isHorizontal, includeLogicalLeftEdge, includeLogicalRightEdge);
-}
-
-void RoundedRect::excludeLogicalEdges(bool isHorizontal, bool excludeLogicalLeftEdge, bool excludeLogicalRightEdge)
+void RoundedRect::includeLogicalEdges(const Radii& edges, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
{
- m_radii.excludeLogicalEdges(isHorizontal, excludeLogicalLeftEdge, excludeLogicalRightEdge);
+ m_radii.includeLogicalEdges(edges, includeLogicalLeftEdge, includeLogicalRightEdge);
}
bool RoundedRect::isRenderable() const
« no previous file with comments | « sky/engine/platform/geometry/RoundedRect.h ('k') | sky/engine/platform/text/WritingMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698