WebKit Bugzilla
Attachment 348983 Details for
Bug 189329
: Add Support for Conic Gradients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189329-20180905172318.patch (text/plain), 24.37 KB, created by
Megan Gardner
on 2018-09-05 17:23:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-05 17:23:19 PDT
Size:
24.37 KB
patch
obsolete
>Subversion Revision: 235393 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1aaf568e295c76f5d34b844db8cd3677074dfe56..42eb675f865cfe85dfc48a2413a2277757505104 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,54 @@ >+2018-09-05 Megan Gardner <megan_gardner@apple.com> >+ >+ Add Support for Conic Gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189329 >+ <rdar://problem/21444701> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add support to draw conic gradients, as specified in the CSS source. >+ The parsing work was already done, this just hooks up the data we have >+ with the CG functionality for conic gradients. Add the needed plumbing >+ to allow for this additional type and fill in the creation of >+ a conic gradient. >+ >+ Tests: fast/gradients/conic-repeating.html >+ fast/gradients/conic.html >+ >+ * css/CSSGradientValue.cpp: >+ (WebCore::createGradient): >+ (WebCore::LinearGradientAdapter::gradientLength const): >+ (WebCore::RadialGradientAdapter::gradientLength const): >+ (WebCore::ConicGradientAdapter::ConicGradientAdapter): >+ (WebCore::ConicGradientAdapter::gradientLength const): >+ (WebCore::ConicGradientAdapter::maxExtent const): >+ (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange): >+ >+ Compute what the color stops should be if they extend past 0-1 >+ >+ (WebCore::CSSGradientValue::computeStops): >+ (WebCore::CSSConicGradientValue::createGradient): >+ (WebCore::LinearGradientAdapter::startPoint const): Deleted. >+ (WebCore::LinearGradientAdapter::endPoint const): Deleted. >+ (WebCore::RadialGradientAdapter::startPoint const): Deleted. >+ (WebCore::RadialGradientAdapter::endPoint const): Deleted. >+ >+ Start and End points weren't very universal. All we really need from these >+ gradientAdapters is their length, so just ask for that instead. >+ >+ * inspector/InspectorCanvas.cpp: >+ (WebCore::InspectorCanvas::buildArrayForCanvasGradient): >+ * platform/graphics/Gradient.cpp: >+ (WebCore::Gradient::create): >+ (WebCore::Gradient::Gradient): >+ (WebCore::Gradient::type const): >+ (WebCore::Gradient::adjustParametersForTiledDrawing): >+ (WebCore::Gradient::isZeroSize const): >+ (WebCore::Gradient::hash const): >+ * platform/graphics/Gradient.h: >+ * platform/graphics/cg/GradientCG.cpp: >+ (WebCore::Gradient::paint): >+ > 2018-08-27 Simon Fraser <simon.fraser@apple.com> > > Improve the showAllDocuments logging >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 5ec5e2160f5e2b25a3fe3db2fb534f4a8120d8be..59606cf1f54c064c3ab564eee75b194e08640c79 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,15 @@ >+2018-09-05 Megan Gardner <megan_gardner@apple.com> >+ >+ Add Support for Conic Gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189329 >+ <rdar://problem/21444701> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Define the CG functionality for conic gradients. >+ >+ * pal/spi/cg/CoreGraphicsSPI.h: >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Build system support for LTO >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index b0933664def1faf18c03121a6bb82384fcaa212e..9c5a399d98e51c8d9075195dcfc6dd52e516861c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2018-09-05 Megan Gardner <megan_gardner@apple.com> >+ >+ Add Support for Conic Gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189329 >+ <rdar://problem/21444701> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Connect up web preferences to allow conic gradients to be turned on in the >+ experimental features menu. >+ >+ * Shared/WebPreferences.yaml: >+ > 2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com> > > [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory >diff --git a/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h b/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h >index 37737f62ca058c56dc738bf0fc262b9af227dc12..c0de3b254a614c509f753617f770a6ec47b23d3a 100644 >--- a/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h >+++ b/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h >@@ -279,6 +279,8 @@ CGRect* CGSNextRect(const CGSRegionEnumeratorObj); > CGSRegionEnumeratorObj CGSRegionEnumerator(CGRegionRef); > CGStyleRef CGStyleCreateFocusRingWithColor(const CGFocusRingStyle*, CGColorRef); > void CGContextSetStyle(CGContextRef, CGStyleRef); >+ >+void CGContextDrawConicGradient(CGContextRef, CGGradientRef, CGPoint center, CGFloat angle); > #endif > > #if PLATFORM(WIN) >diff --git a/Source/WebCore/css/CSSGradientValue.cpp b/Source/WebCore/css/CSSGradientValue.cpp >index 7fb1de559e21796a7df2b19f82f838195b719e1b..bfc80a1b6e34a2eb492164b9012a388021bde3e7 100644 >--- a/Source/WebCore/css/CSSGradientValue.cpp >+++ b/Source/WebCore/css/CSSGradientValue.cpp >@@ -45,7 +45,9 @@ static inline Ref<Gradient> createGradient(CSSGradientValue& value, RenderElemen > { > if (is<CSSLinearGradientValue>(value)) > return downcast<CSSLinearGradientValue>(value).createGradient(renderer, size); >- return downcast<CSSRadialGradientValue>(value).createGradient(renderer, size); >+ if (is<CSSRadialGradientValue>(value)) >+ return downcast<CSSRadialGradientValue>(value).createGradient(renderer, size); >+ return downcast<CSSConicGradientValue>(value).createGradient(renderer, size); > } > > RefPtr<Image> CSSGradientValue::image(RenderElement& renderer, const FloatSize& size) >@@ -125,9 +127,12 @@ public: > : m_data(data) > { > } >- >- FloatPoint startPoint() const { return m_data.point0; } >- FloatPoint endPoint() const { return m_data.point1; } >+ >+ float gradientLength() const >+ { >+ auto gradientSize = m_data.point0 - m_data.point1; >+ return gradientSize.diagonalLength(); >+ } > float maxExtent(float, float) const { return 1; } > > void normalizeStopsAndEndpointsOutsideRange(Vector<GradientStop>& stops) >@@ -162,8 +167,7 @@ public: > { > } > >- FloatPoint startPoint() const { return m_data.point0; } >- FloatPoint endPoint() const { return m_data.point0 + FloatSize { m_data.endRadius, 0 }; } >+ float gradientLength() const { return m_data.endRadius; } > > // Radial gradients may need to extend further than the endpoints, because they have > // to repeat out to the corners of the box. >@@ -224,8 +228,78 @@ private: > Gradient::RadialData& m_data; > }; > >+class ConicGradientAdapter { >+public: >+ explicit ConicGradientAdapter() { } >+ float gradientLength() const { return 1; } >+ float maxExtent(float, float) const { return 1; } >+ >+ void normalizeStopsAndEndpointsOutsideRange(Vector<GradientStop>& stops) >+ { >+ auto numStops = stops.size(); >+ >+ size_t firstZeroOrGreaterIndex = numStops; >+ for (size_t i = 0; i < numStops; ++i) { >+ if (stops[i].offset >= 0) { >+ firstZeroOrGreaterIndex = i; >+ break; >+ } >+ } >+ >+ if (firstZeroOrGreaterIndex > 0) { >+ if (firstZeroOrGreaterIndex < numStops && stops[firstZeroOrGreaterIndex].offset > 0) { >+ float prevOffset = stops[firstZeroOrGreaterIndex - 1].offset; >+ float nextOffset = stops[firstZeroOrGreaterIndex].offset; >+ >+ float interStopProportion = -prevOffset / (nextOffset - prevOffset); >+ // FIXME: when we interpolate gradients using premultiplied colors, this should do premultiplication. >+ Color blendedColor = blend(stops[firstZeroOrGreaterIndex - 1].color, stops[firstZeroOrGreaterIndex].color, interStopProportion); >+ >+ // Clamp the positions to 0 and set the color. >+ for (size_t i = 0; i < firstZeroOrGreaterIndex; ++i) { >+ stops[i].offset = 0; >+ stops[i].color = blendedColor; >+ } >+ } else { >+ // All stops are below 0; just clamp them. >+ for (size_t i = 0; i < firstZeroOrGreaterIndex; ++i) >+ stops[i].offset = 0; >+ } >+ } >+ >+ size_t lastOneOrLessIndex = numStops; >+ for (size_t i = numStops - 1; i >= 0; --i) { >+ if (stops[i].offset <= 1) { >+ lastOneOrLessIndex = i; >+ break; >+ } >+ } >+ >+ if (lastOneOrLessIndex < numStops - 1) { >+ if (lastOneOrLessIndex < numStops && stops[lastOneOrLessIndex].offset < 1) { >+ float prevOffset = stops[lastOneOrLessIndex].offset; >+ float nextOffset = stops[lastOneOrLessIndex + 1].offset; >+ >+ float interStopProportion = 1 / (nextOffset - prevOffset); >+ // FIXME: when we interpolate gradients using premultiplied colors, this should do premultiplication. >+ Color blendedColor = blend(stops[lastOneOrLessIndex].color, stops[lastOneOrLessIndex + 1].color, interStopProportion); >+ >+ // Clamp the positions to 1 and set the color. >+ for (size_t i = lastOneOrLessIndex + 1; i < numStops; ++i) { >+ stops[i].offset = 1; >+ stops[i].color = blendedColor; >+ } >+ } else { >+ // All stops are above 1; just clamp them. >+ for (size_t i = lastOneOrLessIndex; i < numStops; ++i) >+ stops[i].offset = 1; >+ } >+ } >+ } >+}; >+ > template<typename GradientAdapter> >-Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradient, const CSSToLengthConversionData& conversionData, const RenderStyle& style, float maxLengthForRepeat) >+Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradientAdapter, const CSSToLengthConversionData& conversionData, const RenderStyle& style, float maxLengthForRepeat) > { > if (m_gradientType == CSSDeprecatedLinearGradient || m_gradientType == CSSDeprecatedRadialGradient) { > sortStopsIfNeeded(); >@@ -252,11 +326,7 @@ Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradie > size_t numStops = m_stops.size(); > Vector<GradientStop> stops(numStops); > >- auto gradientStart = gradient.startPoint(); >- auto gradientEnd = gradient.endPoint(); >- >- auto gradientSize = gradientStart - gradientEnd; >- float gradientLength = gradientSize.diagonalLength(); >+ float gradientLength = gradientAdapter.gradientLength(); > > for (size_t i = 0; i < numStops; ++i) { > auto& stop = m_stops[i]; >@@ -282,7 +352,9 @@ Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradie > length = calculationValue->evaluate(gradientLength); > } > stops[i].offset = (gradientLength > 0) ? length / gradientLength : 0; >- } else { >+ } else if (positionValue.isAngle()) >+ stops[i].offset = positionValue.floatValue(CSSPrimitiveValue::CSS_DEG) / 360; >+ else { > ASSERT_NOT_REACHED(); > stops[i].offset = 0; > } >@@ -438,7 +510,7 @@ Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradie > stops.shrink(1); > numStops = 1; > } else { >- float maxExtent = gradient.maxExtent(maxLengthForRepeat, gradientLength); >+ float maxExtent = gradientAdapter.maxExtent(maxLengthForRepeat, gradientLength); > > size_t originalNumStops = numStops; > size_t originalFirstStopIndex = 0; >@@ -486,7 +558,7 @@ Gradient::ColorStopVector CSSGradientValue::computeStops(GradientAdapter& gradie > > // If the gradient goes outside the 0-1 range, normalize it by moving the endpoints, and adjusting the stops. > if (stops.size() > 1 && (stops.first().offset < 0 || stops.last().offset > 1)) >- gradient.normalizeStopsAndEndpointsOutsideRange(stops); >+ gradientAdapter.normalizeStopsAndEndpointsOutsideRange(stops); > > Gradient::ColorStopVector result; > result.reserveInitialCapacity(stops.size()); >@@ -1350,10 +1422,29 @@ String CSSConicGradientValue::customCSSText() const > return result.toString(); > } > >-Ref<Gradient> CSSConicGradientValue::createGradient(RenderElement&, const FloatSize&) >+Ref<Gradient> CSSConicGradientValue::createGradient(RenderElement& renderer, const FloatSize& size) > { >- // FIXME: Implement. >- return Gradient::create(Gradient::LinearData { }); >+ ASSERT(!size.isEmpty()); >+ >+ CSSToLengthConversionData conversionData(&renderer.style(), renderer.document().documentElement()->renderStyle(), &renderer.view()); >+ >+ FloatPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), conversionData, size); >+ if (!m_firstX) >+ firstPoint.setX(size.width() / 2); >+ if (!m_firstY) >+ firstPoint.setY(size.height() / 2); >+ >+ float angle = 0; >+ if (m_angle) >+ angle = m_angle->floatValue(CSSPrimitiveValue::CSS_DEG); >+ >+ Gradient::ConicData data { firstPoint, angle }; >+ ConicGradientAdapter adapter; >+ auto stops = computeStops(adapter, conversionData, renderer.style(), 1); >+ >+ auto gradient = Gradient::create(WTFMove(data)); >+ gradient->setSortedColorStops(WTFMove(stops)); >+ return gradient; > } > > bool CSSConicGradientValue::equals(const CSSConicGradientValue& other) const >diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp >index 0caa76460bea3c36138b969239f0419b2605be51..71f598ef20c0924146ec62fef3df26dcf0a46552 100644 >--- a/Source/WebCore/inspector/InspectorCanvas.cpp >+++ b/Source/WebCore/inspector/InspectorCanvas.cpp >@@ -613,8 +613,8 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildAction(const String& name, > Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildArrayForCanvasGradient(const CanvasGradient& canvasGradient) > { > const auto& gradient = canvasGradient.gradient(); >- >- String type = gradient.type() == Gradient::Type::Radial ? "radial-gradient"_s : "linear-gradient"_s; >+ >+ String type = gradient.type() == Gradient::Type::Radial ? "radial-gradient"_s : gradient.type() == Gradient::Type::Linear ? "linear-gradient"_s : "conic-gradient"_s; > > auto parameters = JSON::ArrayOf<float>::create(); > WTF::switchOn(gradient.data(), >@@ -631,6 +631,11 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildArrayForCanvasGradient(con > parameters->addItem(data.point1.x()); > parameters->addItem(data.point1.y()); > parameters->addItem(data.endRadius); >+ }, >+ [¶meters] (const Gradient::ConicData& data) { >+ parameters->addItem(data.point0.x()); >+ parameters->addItem(data.point0.y()); >+ parameters->addItem(data.angle); > } > ); > >diff --git a/Source/WebCore/platform/graphics/Gradient.cpp b/Source/WebCore/platform/graphics/Gradient.cpp >index 8994c021edfb92616bedcf2f527ae156bb17c529..2898a4c939223ea2db017724799419a972e00a15 100644 >--- a/Source/WebCore/platform/graphics/Gradient.cpp >+++ b/Source/WebCore/platform/graphics/Gradient.cpp >@@ -46,6 +46,11 @@ Ref<Gradient> Gradient::create(RadialData&& data) > return adoptRef(*new Gradient(WTFMove(data))); > } > >+Ref<Gradient> Gradient::create(ConicData&& data) >+{ >+ return adoptRef(*new Gradient(WTFMove(data))); >+} >+ > Gradient::Gradient(LinearData&& data) > : m_data(WTFMove(data)) > { >@@ -57,6 +62,12 @@ Gradient::Gradient(RadialData&& data) > { > platformInit(); > } >+ >+Gradient::Gradient(ConicData&& data) >+ : m_data(WTFMove(data)) >+{ >+ platformInit(); >+} > > Gradient::~Gradient() > { >@@ -71,6 +82,9 @@ auto Gradient::type() const -> Type > }, > [] (const RadialData&) { > return Type::Radial; >+ }, >+ [] (const ConicData&) { >+ return Type::Conic; > } > ); > } >@@ -99,6 +113,8 @@ void Gradient::adjustParametersForTiledDrawing(FloatSize& size, FloatRect& srcRe > srcRect.setY(0); > }, > [] (const RadialData&) { >+ }, >+ [] (const ConicData&) { > } > ); > } >@@ -111,6 +127,9 @@ bool Gradient::isZeroSize() const > }, > [] (const RadialData& data) { > return data.point0.x() == data.point1.x() && data.point0.y() == data.point1.y() && data.startRadius == data.endRadius; >+ }, >+ [] (const ConicData&) { >+ return false; > } > ); > } >@@ -204,6 +223,7 @@ unsigned Gradient::hash() const > float startRadius; > float endRadius; > float aspectRatio; >+ float angle; > GradientSpreadMethod spreadMethod; > AffineTransform gradientSpaceTransformation; > } parameters; >@@ -223,6 +243,7 @@ unsigned Gradient::hash() const > parameters.startRadius = 0; > parameters.endRadius = 0; > parameters.aspectRatio = 0; >+ parameters.angle = 0; > parameters.type = Type::Linear; > }, > [¶meters] (const RadialData& data) { >@@ -231,7 +252,17 @@ unsigned Gradient::hash() const > parameters.startRadius = data.startRadius; > parameters.endRadius = data.endRadius; > parameters.aspectRatio = data.aspectRatio; >+ parameters.angle = 0; > parameters.type = Type::Radial; >+ }, >+ [¶meters] (const ConicData& data) { >+ parameters.point0 = data.point0; >+ parameters.point1 = {0, 0}; >+ parameters.startRadius = 0; >+ parameters.endRadius = 0; >+ parameters.aspectRatio = 0; >+ parameters.angle = data.angle; >+ parameters.type = Type::Conic; > } > ); > >diff --git a/Source/WebCore/platform/graphics/Gradient.h b/Source/WebCore/platform/graphics/Gradient.h >index c7fc4c6e369380a5e9a773124f740a63fdb5100b..b6e62a2accc05fc82968417cdf85503fd092ba19 100644 >--- a/Source/WebCore/platform/graphics/Gradient.h >+++ b/Source/WebCore/platform/graphics/Gradient.h >@@ -85,13 +85,19 @@ public: > float endRadius; > float aspectRatio; // For elliptical gradient, width / height. > }; >+ >+ struct ConicData { >+ FloatPoint point0; >+ float angle; >+ }; > >- using Data = Variant<LinearData, RadialData>; >+ using Data = Variant<LinearData, RadialData, ConicData>; > >- enum class Type { Linear, Radial }; >+ enum class Type { Linear, Radial, Conic }; > > static Ref<Gradient> create(LinearData&&); > static Ref<Gradient> create(RadialData&&); >+ static Ref<Gradient> create(ConicData&&); > > WEBCORE_EXPORT ~Gradient(); > >@@ -133,6 +139,7 @@ public: > private: > Gradient(LinearData&&); > Gradient(RadialData&&); >+ Gradient(ConicData&&); > > PlatformGradient platformGradient(); > void platformInit() { m_gradient = nullptr; } >diff --git a/Source/WebCore/platform/graphics/cg/GradientCG.cpp b/Source/WebCore/platform/graphics/cg/GradientCG.cpp >index 1086932f26c37d9480c311ae3821f2888cbe9932..8de9217f759a2dda581cc5be6d2939ebc95bc607 100644 >--- a/Source/WebCore/platform/graphics/cg/GradientCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/GradientCG.cpp >@@ -30,6 +30,7 @@ > #if USE(CG) > > #include "GraphicsContextCG.h" >+#include <CoreGraphics/CGContextPrivate.h> > #include <CoreGraphics/CoreGraphics.h> > #include <wtf/RetainPtr.h> > >@@ -127,6 +128,14 @@ void Gradient::paint(CGContextRef platformContext) > > if (needScaling) > CGContextRestoreGState(platformContext); >+ }, >+ [&] (const ConicData& data) { >+ CGContextSaveGState(platformContext); >+ CGContextTranslateCTM(platformContext, data.point0.x(), data.point0.y()); >+ CGContextRotateCTM(platformContext, (CGFloat)-M_PI_2); >+ CGContextTranslateCTM(platformContext, -data.point0.x(), -data.point0.y()); >+ CGContextDrawConicGradient(platformContext, platformGradient(), data.point0, data.angle); >+ CGContextRestoreGState(platformContext); > } > ); > } >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 260221cb30cd25bf524c22b74e6525187fb8001c..48f238c22fe6e48e0c43185cefbd844f25f02e6f 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1130,6 +1130,13 @@ SpringTimingFunctionEnabled: > humanReadableDescription: "CSS Spring Animation prototype" > category: experimental > >+ConicGradientsEnabled: >+ type: bool >+ defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED >+ humanReadableName: "CSS Conic Gradient" >+ humanReadableDescription: "CSS Conic Gradient prototype" >+ category: experimental >+ > ImageBitmapOffscreenCanvasEnabled: > type: bool > defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index cc4adee92b9903207db44ab7ff064d17108742a0..d239405cd87ac4ae3636a9d776346e0e6b8b6e9e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2018-09-05 Megan Gardner <megan_gardner@apple.com> >+ >+ Add Support for Conic Gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189329 >+ <rdar://problem/21444701> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Simple tests to see if conic gradients are rendered properly. >+ >+ * fast/gradients/conic-expected.html: Added. >+ * fast/gradients/conic-repeating-expected.html: Added. >+ * fast/gradients/conic-repeating.html: Added. >+ * fast/gradients/conic.html: Added. >+ > 2018-08-27 Andy Estes <aestes@apple.com> > > [Payment Request] Update payment-request web platform tests >diff --git a/LayoutTests/fast/gradients/conic-expected.html b/LayoutTests/fast/gradients/conic-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..045b6a92104d651a3589519ded14266f1d8e73b7 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-expected.html >@@ -0,0 +1,24 @@ >+<html> >+<head> >+ <style> >+ #box1 { >+ height: 50px; >+ width: 25px; >+ float: left; >+ background-color: gold; >+ } >+ #box2 { >+ height: 50px; >+ width: 25px; >+ float: left; >+ background-color: #f06; >+ } >+ </style> >+</head> >+<body> >+ <div id="container"> >+ <div id="box1"></div> >+ <div id="box2"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-repeating-expected.html b/LayoutTests/fast/gradients/conic-repeating-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..35bd4f599be233e7d157f7e6e27df1607c7c984e >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-repeating-expected.html >@@ -0,0 +1,32 @@ >+<html> >+<head> >+ <style> >+ div { >+ width: 50px; >+ height: 50px; >+ float: left; >+ } >+ >+ #box1 { >+ background-color: red; >+ } >+ #box2 { >+ background-color: black; >+ } >+ #box3 { >+ clear: left; >+ background-color: black; >+ } >+ #box4 { >+ background-color: red; >+ } >+ >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+ <div id="box2"></div> >+ <div id="box3"></div> >+ <div id="box4"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-repeating.html b/LayoutTests/fast/gradients/conic-repeating.html >new file mode 100644 >index 0000000000000000000000000000000000000000..90541fcbe5bbed24b9017a07e3d3479ce65bda54 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-repeating.html >@@ -0,0 +1,17 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 100px; >+ width: 100px; >+ background: repeating-conic-gradient( >+ black 0deg, black 90deg, >+ red 0deg, red 180deg >+ ); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic.html b/LayoutTests/fast/gradients/conic.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e649855679315be2d7001bf8704bff9efe4449c1 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(#f06 0deg, #f06 180deg, gold 180deg, gold 360deg); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189329
:
348983
|
348992
|
349035
|
349038
|
349052
|
349057
|
349061
|
349067
|
349079
|
349091
|
349093
|
349094
|
349100