- Revision
- 198075
- Author
- [email protected]
- Date
- 2016-03-12 17:55:45 -0800 (Sat, 12 Mar 2016)
Log Message
REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
https://bugs.webkit.org/show_bug.cgi?id=155400
<rdar://problem/24818602>
Reviewed by Anders Carlsson.
Source/WebCore:
When we unprefixed CSS filters we accidentally
stopped SVG elements that use the CSS filter shorthands
from rendering. We still don't actually support
the shorthands in this case, but we should render
the element without the filter.
Tests: css3/filters/filters-on-svg-element.html
css3/filters/filters-on-svg-root.html
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::hasReferenceFilterOnly): Add
this new function that tells us if we have the
style of filter that we can handle in SVG content.
* rendering/style/RenderStyle.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
We can mark an element as ready to render if it
has a shorthand filter.
LayoutTests:
Add tests with SVG content that uses CSS filter
shorthands. These particular filters are no-ops
so should not affect rendering. If they actually
tried to do something you wouldn't see them work
until we enable shorthand filters on SVG content.
* css3/filters/filters-on-svg-element-expected.html: Added.
* css3/filters/filters-on-svg-element.html: Added.
* css3/filters/filters-on-svg-root-expected.html: Added.
* css3/filters/filters-on-svg-root.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (198074 => 198075)
--- trunk/LayoutTests/ChangeLog 2016-03-13 00:36:59 UTC (rev 198074)
+++ trunk/LayoutTests/ChangeLog 2016-03-13 01:55:45 UTC (rev 198075)
@@ -1,3 +1,22 @@
+2016-03-12 Dean Jackson <[email protected]>
+
+ REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
+ https://bugs.webkit.org/show_bug.cgi?id=155400
+ <rdar://problem/24818602>
+
+ Reviewed by Anders Carlsson.
+
+ Add tests with SVG content that uses CSS filter
+ shorthands. These particular filters are no-ops
+ so should not affect rendering. If they actually
+ tried to do something you wouldn't see them work
+ until we enable shorthand filters on SVG content.
+
+ * css3/filters/filters-on-svg-element-expected.html: Added.
+ * css3/filters/filters-on-svg-element.html: Added.
+ * css3/filters/filters-on-svg-root-expected.html: Added.
+ * css3/filters/filters-on-svg-root.html: Added.
+
2016-03-12 Myles C. Maxfield <[email protected]>
[OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
Added: trunk/LayoutTests/css3/filters/filters-on-svg-element-expected.html (0 => 198075)
--- trunk/LayoutTests/css3/filters/filters-on-svg-element-expected.html (rev 0)
+++ trunk/LayoutTests/css3/filters/filters-on-svg-element-expected.html 2016-03-13 01:55:45 UTC (rev 198075)
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 20 20" width="100px" height="100px">
+ <rect width="20" height="20" fill="red"/>
+ <circle cx="10" cy="10" r="8"/>
+</svg>
Property changes on: trunk/LayoutTests/css3/filters/filters-on-svg-element-expected.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/css3/filters/filters-on-svg-element.html (0 => 198075)
--- trunk/LayoutTests/css3/filters/filters-on-svg-element.html (rev 0)
+++ trunk/LayoutTests/css3/filters/filters-on-svg-element.html 2016-03-13 01:55:45 UTC (rev 198075)
@@ -0,0 +1,9 @@
+<style>
+rect {
+ filter: blur(0);
+}
+</style>
+<svg viewBox="0 0 20 20" width="100px" height="100px">
+ <rect width="20" height="20" fill="red"/>
+ <circle cx="10" cy="10" r="8"/>
+</svg>
Property changes on: trunk/LayoutTests/css3/filters/filters-on-svg-element.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/css3/filters/filters-on-svg-root-expected.html (0 => 198075)
--- trunk/LayoutTests/css3/filters/filters-on-svg-root-expected.html (rev 0)
+++ trunk/LayoutTests/css3/filters/filters-on-svg-root-expected.html 2016-03-13 01:55:45 UTC (rev 198075)
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 20 20" width="100px" height="100px">
+ <rect width="20" height="20" fill="red"/>
+ <circle cx="10" cy="10" r="8"/>
+</svg>
Property changes on: trunk/LayoutTests/css3/filters/filters-on-svg-root-expected.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/css3/filters/filters-on-svg-root.html (0 => 198075)
--- trunk/LayoutTests/css3/filters/filters-on-svg-root.html (rev 0)
+++ trunk/LayoutTests/css3/filters/filters-on-svg-root.html 2016-03-13 01:55:45 UTC (rev 198075)
@@ -0,0 +1,9 @@
+<style>
+svg {
+ filter: blur(0);
+}
+</style>
+<svg viewBox="0 0 20 20" width="100px" height="100px">
+ <rect width="20" height="20" fill="red"/>
+ <circle cx="10" cy="10" r="8"/>
+</svg>
Property changes on: trunk/LayoutTests/css3/filters/filters-on-svg-root.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (198074 => 198075)
--- trunk/Source/WebCore/ChangeLog 2016-03-13 00:36:59 UTC (rev 198074)
+++ trunk/Source/WebCore/ChangeLog 2016-03-13 01:55:45 UTC (rev 198075)
@@ -1,3 +1,30 @@
+2016-03-12 Dean Jackson <[email protected]>
+
+ REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
+ https://bugs.webkit.org/show_bug.cgi?id=155400
+ <rdar://problem/24818602>
+
+ Reviewed by Anders Carlsson.
+
+ When we unprefixed CSS filters we accidentally
+ stopped SVG elements that use the CSS filter shorthands
+ from rendering. We still don't actually support
+ the shorthands in this case, but we should render
+ the element without the filter.
+
+ Tests: css3/filters/filters-on-svg-element.html
+ css3/filters/filters-on-svg-root.html
+
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::hasReferenceFilterOnly): Add
+ this new function that tells us if we have the
+ style of filter that we can handle in SVG content.
+ * rendering/style/RenderStyle.h:
+ * rendering/svg/SVGRenderingContext.cpp:
+ (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
+ We can mark an element as ready to render if it
+ has a shorthand filter.
+
2016-03-12 Myles C. Maxfield <[email protected]>
Delete dead SVG Font code
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (198074 => 198075)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2016-03-13 00:36:59 UTC (rev 198074)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2016-03-13 01:55:45 UTC (rev 198075)
@@ -1974,6 +1974,22 @@
#endif
+bool RenderStyle::hasReferenceFilterOnly() const
+{
+ if (!hasFilter())
+ return false;
+
+ const FilterOperations& filterOperations = rareNonInheritedData->m_filter->m_operations;
+ if (filterOperations.size() != 1)
+ return false;
+
+ const FilterOperation& filterOperation = *filterOperations.at(0);
+ if (filterOperation.type() != FilterOperation::REFERENCE)
+ return false;
+
+ return true;
+}
+
void RenderStyle::checkVariablesInCustomProperties()
{
if (!rareInheritedData->m_customProperties->containsVariables())
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (198074 => 198075)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-03-13 00:36:59 UTC (rev 198074)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-03-13 01:55:45 UTC (rev 198075)
@@ -1161,6 +1161,7 @@
FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; }
const FilterOperations& filter() const { return rareNonInheritedData->m_filter->m_operations; }
bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operations.operations().isEmpty(); }
+ bool hasReferenceFilterOnly() const;
#if ENABLE(FILTERS_LEVEL_2)
FilterOperations& mutableBackdropFilter() { return rareNonInheritedData.access()->m_backdropFilter.access()->m_operations; }
Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (198074 => 198075)
--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp 2016-03-13 00:36:59 UTC (rev 198074)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp 2016-03-13 01:55:45 UTC (rev 198075)
@@ -153,7 +153,7 @@
auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*m_renderer);
if (!resources) {
- if (style.hasFilter())
+ if (style.hasReferenceFilterOnly())
return;
m_renderingFlags |= RenderingPrepared;