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

Side by Side Diff: Source/core/rendering/shapes/BoxShape.cpp

Issue 237313003: CSS shapes support in Web Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 if (marginBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) { 94 if (marginBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) {
95 x1 = std::min<float>(x1, minXIntercept); 95 x1 = std::min<float>(x1, minXIntercept);
96 x2 = std::max<float>(x2, maxXIntercept); 96 x2 = std::max<float>(x2, maxXIntercept);
97 } 97 }
98 98
99 ASSERT(x2 >= x1); 99 ASSERT(x2 >= x1);
100 result.append(LineSegment(x1, x2)); 100 result.append(LineSegment(x1, x2));
101 } 101 }
102 102
103 void BoxShape::buildDisplayPaths(DisplayPaths& paths) const
104 {
105 paths.shape.addRoundedRect(m_bounds.rect(), m_bounds.radii().topLeft(), m_bo unds.radii().topRight(), m_bounds.radii().bottomLeft(), m_bounds.radii().bottomR ight());
106 if (shapeMargin())
107 paths.marginShape.addRoundedRect(shapeMarginBounds().rect(), shapeMargin Bounds().radii().topLeft(), shapeMarginBounds().radii().topRight(), shapeMarginB ounds().radii().bottomLeft(), shapeMarginBounds().radii().bottomRight());
108 }
109
103 } // namespace WebCore 110 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698