WebKit Bugzilla
Attachment 349057 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 for landing
bug-189329-20180906130634.patch (text/plain), 28.61 KB, created by
Megan Gardner
on 2018-09-06 13:06:35 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-06 13:06:35 PDT
Size:
28.61 KB
patch
obsolete
>Subversion Revision: 235715 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 99072acb92685dde08ba0ebe077c4d5d643d1ffd..385d9d6782d4c7dbab2505ff65cb05180091fc29 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 Simon Fraser. >+ >+ Add support for rendering CSS conic gradients. >+ 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-09-05 Youenn Fablet <youenn@apple.com> > > Expose RTCRtpSender.setParameters >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 4012e5eb4c3729de15db30ea93c0dca3dd2bd6a4..ec0215c8272cf744b7648d32ca5f052c4f365e08 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 Simon Fraser. >+ >+ Define the CG functionality for conic gradients. >+ >+ * pal/spi/cg/CoreGraphicsSPI.h: >+ > 2018-09-04 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, attempt to fix an internal build after r235585. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5a5f554d1e5a293e1df79a0821ea69c044aabc4c..538a0719680da15c1a945d2f13c54920b5a26271 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 Simon Fraser. >+ >+ Connect up web preferences to allow conic gradients to be turned on in the >+ experimental features menu. >+ >+ * Shared/WebPreferences.yaml: >+ > 2018-09-05 David Kilzer <ddkilzer@apple.com> > > REGRESSION (r235489): WKSharingServicePickerDelegate.mm accidentally added back to Sources in WebKit project >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..8eb338bb660a1e2fdb083dae5d33a25e34d0e396 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 (int 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 centerPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), conversionData, size); >+ if (!m_firstX) >+ centerPoint.setX(size.width() / 2); >+ if (!m_firstY) >+ centerPoint.setY(size.height() / 2); >+ >+ float angle = 0; >+ if (m_angle) >+ angle = m_angle->floatValue(CSSPrimitiveValue::CSS_DEG); >+ >+ Gradient::ConicData data { centerPoint, 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..1ab1420702637b06a3ba4f34ef32b4b90bd4e074 100644 >--- a/Source/WebCore/platform/graphics/cg/GradientCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/GradientCG.cpp >@@ -127,6 +127,16 @@ void Gradient::paint(CGContextRef platformContext) > > if (needScaling) > CGContextRestoreGState(platformContext); >+ }, >+ [&] (const ConicData& data) { >+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+ 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); >+#endif > } > ); > } >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 54a834ad01a5700618819adb47c3abc84e02c1e3..ce9ccb86c2acd2491a1d512abeb21bfe6bbe488f 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1148,6 +1148,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 60be969cc13b62b7f3ea1e5b33fbeb203eecf4ec..ef18695e50d7f912cafe40e686c947ccbf9dd3e2 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 Simon Fraser. >+ >+ 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-09-05 Youenn Fablet <youenn@apple.com> > > Expose RTCRtpSender.setParameters >diff --git a/LayoutTests/fast/gradients/conic-center-outside-box-expected.html b/LayoutTests/fast/gradients/conic-center-outside-box-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3638ffd554bfcce1a9e26df91202a2ab40655402 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-center-outside-box-expected.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #box1 { >+ height: 50px; >+ width: 50px; >+ background-color: orange; >+ } >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-center-outside-box.html b/LayoutTests/fast/gradients/conic-center-outside-box.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7832a457f0a0ec6e9039d373142dd0ceb1236255 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-center-outside-box.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(at -10px -10px, blue 0deg, blue 90deg, orange 90deg, orange 180deg, green 180deg, green 270deg, blue 270deg, blue 360deg); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-expected.html b/LayoutTests/fast/gradients/conic-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e9b87afc465260401aa3f069f5c396d8deaa6547 >--- /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: orange; >+ } >+ #box2 { >+ height: 50px; >+ width: 25px; >+ float: left; >+ background-color: blue; >+ } >+ </style> >+</head> >+<body> >+ <div id="container"> >+ <div id="box1"></div> >+ <div id="box2"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-extended-stops-expected.html b/LayoutTests/fast/gradients/conic-extended-stops-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5b93fedf787c883d3f195e3608f01680a28445c6 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-extended-stops-expected.html >@@ -0,0 +1,31 @@ >+<html> >+<head> >+ <style> >+ div { >+ float: left; >+ } >+ #box1 { >+ height: 25px; >+ width: 50px; >+ float: left; >+ background-color: blue; >+ } >+ #box2 { >+ height: 25px; >+ width: 25px; >+ clear: left; >+ background-color: green; >+ } >+ #box3 { >+ height: 25px; >+ width: 25px; >+ background-color: orange; >+ } >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+ <div id="box2"></div> >+ <div id="box3"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-extended-stops.html b/LayoutTests/fast/gradients/conic-extended-stops.html >new file mode 100644 >index 0000000000000000000000000000000000000000..996ff740e22b6d4bce7aa8099ce0f709e1f45d16 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-extended-stops.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(blue -50deg, blue 90deg, orange 90deg, orange 180deg, green 180deg, green 270deg, blue 270deg, blue 540deg); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-off-center-expected.html b/LayoutTests/fast/gradients/conic-off-center-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..52883f2cce9e9863784646c42f03a5dc0ef3a6f4 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-off-center-expected.html >@@ -0,0 +1,31 @@ >+<html> >+<head> >+ <style> >+ div { >+ float: left; >+ } >+ #box1 { >+ height: 10px; >+ width: 50px; >+ float: left; >+ background-color: blue; >+ } >+ #box2 { >+ height: 40px; >+ width: 10px; >+ clear: left; >+ background-color: green; >+ } >+ #box3 { >+ height: 40px; >+ width: 40px; >+ background-color: orange; >+ } >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+ <div id="box2"></div> >+ <div id="box3"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-off-center.html b/LayoutTests/fast/gradients/conic-off-center.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c73e2ed45e684667902a05ab2d6b595eb5b8b38e >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-off-center.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(at 10px 10px, blue 0deg, blue 90deg, orange 90deg, orange 180deg, green 180deg, green 270deg, blue 270deg, blue 360deg); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></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..5853022ddd117ef632a3adf1071526428fd28c3c >--- /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: orange; >+ } >+ #box2 { >+ background-color: blue; >+ } >+ #box3 { >+ clear: left; >+ background-color: blue; >+ } >+ #box4 { >+ background-color: orange; >+ } >+ >+ </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..a7438fa679b8f312629ce860bd354af01fc5baec >--- /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( >+ blue 0deg, blue 90deg, >+ orange 0deg, orange 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..5e270071628578567d8c9ea2bcc290ccc251fd75 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(blue 0deg, blue 180deg, orange 180deg, orange 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