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

Unified Diff: Source/platform/geometry/FloatRoundedRect.cpp

Issue 1137513003: Apply bleed-avoidance insets _after_ constraining the border (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/geometry/FloatRoundedRect.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/FloatRoundedRect.cpp
diff --git a/Source/platform/geometry/FloatRoundedRect.cpp b/Source/platform/geometry/FloatRoundedRect.cpp
index 8875445361c7e0320d13003495e753fbd073c231..b2f7db8651f5a71d0efca596460a391c5baf9758 100644
--- a/Source/platform/geometry/FloatRoundedRect.cpp
+++ b/Source/platform/geometry/FloatRoundedRect.cpp
@@ -215,6 +215,12 @@ void FloatRoundedRect::inflateWithRadii(int size)
m_radii.scale(factor);
}
+void FloatRoundedRect::shrink(const FloatRectOutsets& insets)
+{
+ m_rect.expand(insets);
+ m_radii.shrink(-insets.top(), -insets.bottom(), -insets.left(), -insets.right());
f(malita) 2015/05/11 18:09:14 Nit: I find the difference in Radii::shrink() vs.
fs 2015/05/12 08:53:55 Annoying indeed...
+}
+
bool FloatRoundedRect::intersectsQuad(const FloatQuad& quad) const
{
if (!quad.intersectsRect(m_rect))
« no previous file with comments | « Source/platform/geometry/FloatRoundedRect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698