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