Commit 16da270c authored by Alexander Surkov's avatar Alexander Surkov Committed by Commit Bot

bustage: fix osx bustage in blink/renderer/core

TimingUpdate::MovePolicy shadows ShadowStyle enum fields.

Bug: 294205
Change-Id: Idf16e65353f4a21b2dea1ba4e74c8bb5d07c7744
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468505
Commit-Queue: Alexander Surkov <asurkov@igalia.com>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816997}
parent ed353283
...@@ -75,11 +75,11 @@ std::unique_ptr<InterpolableShadow> InterpolableShadow::MaybeConvertCSSValue( ...@@ -75,11 +75,11 @@ std::unique_ptr<InterpolableShadow> InterpolableShadow::MaybeConvertCSSValue(
if (!shadow) if (!shadow)
return nullptr; return nullptr;
ShadowStyle shadow_style = kNormal; ShadowStyle shadow_style = ShadowStyle::kNormal;
if (shadow->style) { if (shadow->style) {
if (shadow->style->GetValueID() != CSSValueID::kInset) if (shadow->style->GetValueID() != CSSValueID::kInset)
return nullptr; return nullptr;
shadow_style = kInset; shadow_style = ShadowStyle::kInset;
} }
std::unique_ptr<InterpolableLength> x = MaybeConvertLength(shadow->x.Get()); std::unique_ptr<InterpolableLength> x = MaybeConvertLength(shadow->x.Get());
......
...@@ -2278,7 +2278,7 @@ CSSValue* ComputedStyleUtils::ValueForShadowData(const ShadowData& shadow, ...@@ -2278,7 +2278,7 @@ CSSValue* ComputedStyleUtils::ValueForShadowData(const ShadowData& shadow,
CSSPrimitiveValue* spread = CSSPrimitiveValue* spread =
use_spread ? ZoomAdjustedPixelValue(shadow.Spread(), style) : nullptr; use_spread ? ZoomAdjustedPixelValue(shadow.Spread(), style) : nullptr;
CSSIdentifierValue* shadow_style = CSSIdentifierValue* shadow_style =
shadow.Style() == kNormal shadow.Style() == ShadowStyle::kNormal
? nullptr ? nullptr
: CSSIdentifierValue::Create(CSSValueID::kInset); : CSSIdentifierValue::Create(CSSValueID::kInset);
CSSValue* color = CSSValue* color =
......
...@@ -1389,8 +1389,8 @@ ShadowData StyleBuilderConverter::ConvertShadow( ...@@ -1389,8 +1389,8 @@ ShadowData StyleBuilderConverter::ConvertShadow(
shadow.spread ? shadow.spread->ComputeLength<float>(conversion_data) : 0; shadow.spread ? shadow.spread->ComputeLength<float>(conversion_data) : 0;
ShadowStyle shadow_style = ShadowStyle shadow_style =
shadow.style && shadow.style->GetValueID() == CSSValueID::kInset shadow.style && shadow.style->GetValueID() == CSSValueID::kInset
? kInset ? ShadowStyle::kInset
: kNormal; : ShadowStyle::kNormal;
StyleColor color = StyleColor::CurrentColor(); StyleColor color = StyleColor::CurrentColor();
if (shadow.color) { if (shadow.color) {
if (state) { if (state) {
......
...@@ -107,7 +107,7 @@ static bool HasInsetBoxShadow(const ComputedStyle& style) { ...@@ -107,7 +107,7 @@ static bool HasInsetBoxShadow(const ComputedStyle& style) {
if (!style.BoxShadow()) if (!style.BoxShadow())
return false; return false;
for (const ShadowData& shadow : style.BoxShadow()->Shadows()) { for (const ShadowData& shadow : style.BoxShadow()->Shadows()) {
if (shadow.Style() == kInset) if (shadow.Style() == ShadowStyle::kInset)
return true; return true;
} }
return false; return false;
......
...@@ -81,7 +81,7 @@ void BoxPainterBase::PaintNormalBoxShadow(const PaintInfo& info, ...@@ -81,7 +81,7 @@ void BoxPainterBase::PaintNormalBoxShadow(const PaintInfo& info,
const ShadowList* shadow_list = style.BoxShadow(); const ShadowList* shadow_list = style.BoxShadow();
for (wtf_size_t i = shadow_list->Shadows().size(); i--;) { for (wtf_size_t i = shadow_list->Shadows().size(); i--;) {
const ShadowData& shadow = shadow_list->Shadows()[i]; const ShadowData& shadow = shadow_list->Shadows()[i];
if (shadow.Style() != kNormal) if (shadow.Style() != ShadowStyle::kNormal)
continue; continue;
FloatSize shadow_offset(shadow.X(), shadow.Y()); FloatSize shadow_offset(shadow.X(), shadow.Y());
...@@ -191,7 +191,7 @@ void BoxPainterBase::PaintInsetBoxShadow(const PaintInfo& info, ...@@ -191,7 +191,7 @@ void BoxPainterBase::PaintInsetBoxShadow(const PaintInfo& info,
const ShadowList* shadow_list = style.BoxShadow(); const ShadowList* shadow_list = style.BoxShadow();
for (wtf_size_t i = shadow_list->Shadows().size(); i--;) { for (wtf_size_t i = shadow_list->Shadows().size(); i--;) {
const ShadowData& shadow = shadow_list->Shadows()[i]; const ShadowData& shadow = shadow_list->Shadows()[i];
if (shadow.Style() != kInset) if (shadow.Style() != ShadowStyle::kInset)
continue; continue;
FloatSize shadow_offset(shadow.X(), shadow.Y()); FloatSize shadow_offset(shadow.X(), shadow.Y());
......
...@@ -47,9 +47,9 @@ TEST(FilterOperationsTest, mapRectBlur) { ...@@ -47,9 +47,9 @@ TEST(FilterOperationsTest, mapRectBlur) {
TEST(FilterOperationsTest, mapRectDropShadow) { TEST(FilterOperationsTest, mapRectDropShadow) {
FilterOperations ops; FilterOperations ops;
ops.Operations().push_back( ops.Operations().push_back(MakeGarbageCollected<DropShadowFilterOperation>(
MakeGarbageCollected<DropShadowFilterOperation>(ShadowData( ShadowData(FloatPoint(3, 8), 20, 0, ShadowStyle::kNormal,
FloatPoint(3, 8), 20, 0, kNormal, StyleColor(Color(1, 2, 3))))); StyleColor(Color(1, 2, 3)))));
EXPECT_TRUE(ops.HasFilterThatMovesPixels()); EXPECT_TRUE(ops.HasFilterThatMovesPixels());
EXPECT_EQ(IntRect(-54, -49, 124, 124), EXPECT_EQ(IntRect(-54, -49, 124, 124),
EnclosingIntRect(ops.MapRect(FloatRect(0, 0, 10, 10)))); EnclosingIntRect(ops.MapRect(FloatRect(0, 0, 10, 10))));
...@@ -69,9 +69,9 @@ TEST(FilterOperationsTest, mapRectDropShadowAndBoxReflect) { ...@@ -69,9 +69,9 @@ TEST(FilterOperationsTest, mapRectDropShadowAndBoxReflect) {
// This is a case where the order of filter operations matters, and it's // This is a case where the order of filter operations matters, and it's
// important that the bounds be filtered in the correct order. // important that the bounds be filtered in the correct order.
FilterOperations ops; FilterOperations ops;
ops.Operations().push_back( ops.Operations().push_back(MakeGarbageCollected<DropShadowFilterOperation>(
MakeGarbageCollected<DropShadowFilterOperation>(ShadowData( ShadowData(FloatPoint(100, 200), 0, 0, ShadowStyle::kNormal,
FloatPoint(100, 200), 0, 0, kNormal, StyleColor(Color::kBlack)))); StyleColor(Color::kBlack))));
ops.Operations().push_back(MakeGarbageCollected<BoxReflectFilterOperation>( ops.Operations().push_back(MakeGarbageCollected<BoxReflectFilterOperation>(
BoxReflection(BoxReflection::kVerticalReflection, 50))); BoxReflection(BoxReflection::kVerticalReflection, 50)));
EXPECT_TRUE(ops.HasFilterThatMovesPixels()); EXPECT_TRUE(ops.HasFilterThatMovesPixels());
......
...@@ -34,7 +34,7 @@ bool ShadowData::operator==(const ShadowData& o) const { ...@@ -34,7 +34,7 @@ bool ShadowData::operator==(const ShadowData& o) const {
} }
ShadowData ShadowData::NeutralValue() { ShadowData ShadowData::NeutralValue() {
return ShadowData(FloatPoint(0, 0), 0, 0, kNormal, return ShadowData(FloatPoint(0, 0), 0, 0, ShadowStyle::kNormal,
StyleColor(Color::kTransparent)); StyleColor(Color::kTransparent));
} }
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
namespace blink { namespace blink {
enum ShadowStyle { kNormal, kInset }; enum class ShadowStyle { kNormal, kInset };
// This class holds information about shadows for the text-shadow and box-shadow // This class holds information about shadows for the text-shadow and box-shadow
// properties, as well as the drop-shadow(...) filter operation. // properties, as well as the drop-shadow(...) filter operation.
......
...@@ -38,7 +38,7 @@ namespace blink { ...@@ -38,7 +38,7 @@ namespace blink {
FloatRectOutsets ShadowList::RectOutsetsIncludingOriginal() const { FloatRectOutsets ShadowList::RectOutsetsIncludingOriginal() const {
FloatRectOutsets outsets; FloatRectOutsets outsets;
for (const ShadowData& shadow : Shadows()) { for (const ShadowData& shadow : Shadows()) {
if (shadow.Style() == kInset) if (shadow.Style() == ShadowStyle::kInset)
continue; continue;
outsets.Unite(shadow.RectOutsets()); outsets.Unite(shadow.RectOutsets());
} }
......
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