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

Unified Diff: Source/core/style/ComputedStyle.cpp

Issue 1165393005: Add helper for computing outset for 'outline' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/ComputedStyle.cpp
diff --git a/Source/core/style/ComputedStyle.cpp b/Source/core/style/ComputedStyle.cpp
index aca2e941f6a1bf3d55f75c0322887705b9ed81db..aa60c3b0eb11f65fbb038efdf99f811e6ef158c3 100644
--- a/Source/core/style/ComputedStyle.cpp
+++ b/Source/core/style/ComputedStyle.cpp
@@ -41,6 +41,7 @@
#include "platform/fonts/Font.h"
#include "platform/fonts/FontSelector.h"
#include "platform/geometry/FloatRoundedRect.h"
+#include "platform/graphics/GraphicsContext.h"
#include "wtf/MathExtras.h"
#include <algorithm>
@@ -1611,6 +1612,15 @@ void ComputedStyle::resetMotionPath()
rareNonInheritedData.access()->m_transform.access()->m_motion.m_path = nullptr;
}
+int ComputedStyle::outlineOutset() const
+{
+ if (!hasOutline())
+ return 0;
+ if (outlineStyleIsAuto())
+ return GraphicsContext::focusRingOutsetExtent(outlineOffset(), outlineWidth());
+ return outlineSize();
+}
+
bool ComputedStyle::columnRuleEquivalent(const ComputedStyle* otherStyle) const
{
return columnRuleStyle() == otherStyle->columnRuleStyle()
« no previous file with comments | « Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698