Commit e12d3f7b authored by jbroman@chromium.org's avatar jbroman@chromium.org

Remove additionalOutlineSize in ShadowList: it is always 0.

Review URL: https://codereview.chromium.org/479563002

git-svn-id: svn://svn.chromium.org/blink/trunk@180370 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a482b8b2
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
namespace blink { namespace blink {
static inline void calculateShadowExtent(const ShadowList* shadowList, float additionalOutlineSize, float& shadowLeft, float& shadowRight, float& shadowTop, float& shadowBottom) static inline void calculateShadowExtent(const ShadowList* shadowList, float& shadowLeft, float& shadowRight, float& shadowTop, float& shadowBottom)
{ {
ASSERT(shadowList); ASSERT(shadowList);
size_t shadowCount = shadowList->shadows().size(); size_t shadowCount = shadowList->shadows().size();
...@@ -44,7 +44,7 @@ static inline void calculateShadowExtent(const ShadowList* shadowList, float add ...@@ -44,7 +44,7 @@ static inline void calculateShadowExtent(const ShadowList* shadowList, float add
const ShadowData& shadow = shadowList->shadows()[i]; const ShadowData& shadow = shadowList->shadows()[i];
if (shadow.style() == Inset) if (shadow.style() == Inset)
continue; continue;
float blurAndSpread = shadow.blur() + shadow.spread() + additionalOutlineSize; float blurAndSpread = shadow.blur() + shadow.spread();
shadowLeft = std::min(shadow.x() - blurAndSpread, shadowLeft); shadowLeft = std::min(shadow.x() - blurAndSpread, shadowLeft);
shadowRight = std::max(shadow.x() + blurAndSpread, shadowRight); shadowRight = std::max(shadow.x() + blurAndSpread, shadowRight);
shadowTop = std::min(shadow.y() - blurAndSpread, shadowTop); shadowTop = std::min(shadow.y() - blurAndSpread, shadowTop);
...@@ -52,20 +52,20 @@ static inline void calculateShadowExtent(const ShadowList* shadowList, float add ...@@ -52,20 +52,20 @@ static inline void calculateShadowExtent(const ShadowList* shadowList, float add
} }
} }
void ShadowList::adjustRectForShadow(LayoutRect& rect, float additionalOutlineSize) const void ShadowList::adjustRectForShadow(LayoutRect& rect) const
{ {
FloatRect floatRect(rect); FloatRect floatRect(rect);
adjustRectForShadow(floatRect); adjustRectForShadow(floatRect);
rect = LayoutRect(floatRect); rect = LayoutRect(floatRect);
} }
void ShadowList::adjustRectForShadow(FloatRect& rect, float additionalOutlineSize) const void ShadowList::adjustRectForShadow(FloatRect& rect) const
{ {
float shadowLeft = 0; float shadowLeft = 0;
float shadowRight = 0; float shadowRight = 0;
float shadowTop = 0; float shadowTop = 0;
float shadowBottom = 0; float shadowBottom = 0;
calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom); calculateShadowExtent(this, shadowLeft, shadowRight, shadowTop, shadowBottom);
rect.move(shadowLeft, shadowTop); rect.move(shadowLeft, shadowTop);
rect.setWidth(rect.width() - shadowLeft + shadowRight); rect.setWidth(rect.width() - shadowLeft + shadowRight);
......
...@@ -60,8 +60,8 @@ public: ...@@ -60,8 +60,8 @@ public:
static PassRefPtr<ShadowList> blend(const ShadowList* from, const ShadowList* to, double progress); static PassRefPtr<ShadowList> blend(const ShadowList* from, const ShadowList* to, double progress);
void adjustRectForShadow(LayoutRect&, float additionalOutlineSize = 0) const; void adjustRectForShadow(LayoutRect&) const;
void adjustRectForShadow(FloatRect&, float additionalOutlineSize = 0) const; void adjustRectForShadow(FloatRect&) const;
PassOwnPtr<DrawLooperBuilder> createDrawLooper(DrawLooperBuilder::ShadowAlphaMode, bool isHorizontal = true) const; PassOwnPtr<DrawLooperBuilder> createDrawLooper(DrawLooperBuilder::ShadowAlphaMode, bool isHorizontal = true) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment