https://bugs.webkit.org/show_bug.cgi?id=150232
Reviewed by Simon Fraser.
We should never end up with simple container for composited layer when background-clip: text is present.
(not even when the box has no decoration to paint)
Source/WebCore:
Test: fast/backgrounds/background-clip-text-with-simple-container.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsBoxDecorations):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::backgroundRectForBox):
LayoutTests:
* fast/backgrounds/background-clip-text-with-simple-container-expected.txt: Added.
* fast/backgrounds/background-clip-text-with-simple-container.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191680
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-10-28 Zalan Bujtas <zalan@apple.com>
+
+ Should never be reached failure in WebCore::backgroundRectForBox
+ https://bugs.webkit.org/show_bug.cgi?id=150232
+
+ Reviewed by Simon Fraser.
+
+ We should never end up with simple container for composited layer when background-clip: text is present.
+ (not even when the box has no decoration to paint)
+
+ * fast/backgrounds/background-clip-text-with-simple-container-expected.txt: Added.
+ * fast/backgrounds/background-clip-text-with-simple-container.html: Added.
+
2015-10-28 Ryan Haddad <ryanhaddad@apple.com>
Adding imported/w3c/web-platform-tests/XMLHttpRequest/response-method.htm to the list of flaky tests on win
--- /dev/null
+This should not crash or assert in Debug.
+
--- /dev/null
+<!DOCTYPE html>
+<style>
+ div {
+ -webkit-transform: translateZ(0);
+ -webkit-background-clip: text;
+ }
+</style>
+
+This should not crash or assert in Debug.
+<div></div>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+2015-10-28 Zalan Bujtas <zalan@apple.com>
+
+ Should never be reached failure in WebCore::backgroundRectForBox
+ https://bugs.webkit.org/show_bug.cgi?id=150232
+
+ Reviewed by Simon Fraser.
+
+ We should never end up with simple container for composited layer when background-clip: text is present.
+ (not even when the box has no decoration to paint)
+
+ Test: fast/backgrounds/background-clip-text-with-simple-container.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintsBoxDecorations):
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+ (WebCore::backgroundRectForBox):
+
2015-10-28 Chris Dumez <cdumez@apple.com>
Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
// An unset (invalid) color will remove the solid color.
m_graphicsLayer->setContentsToSolidColor(backgroundColor);
- FloatRect contentsRect = backgroundBoxForPainting();
+ FloatRect contentsRect = backgroundBoxForSimpleContainerPainting();
m_graphicsLayer->setContentsRect(contentsRect);
m_graphicsLayer->setContentsClippingRect(FloatRoundedRect(contentsRect));
didUpdateContentsRect = true;
return;
}
- FloatRect destRect = backgroundBoxForPainting();
+ FloatRect destRect = backgroundBoxForSimpleContainerPainting();
FloatSize phase;
FloatSize tileSize;
if (style.backgroundComposite() != CompositeSourceOver)
return false;
- if (style.backgroundClip() == TextFillBox)
- return false;
-
return true;
}
-bool RenderLayerBacking::paintsBoxDecorations() const
+bool RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() const
{
if (!m_owningLayer.hasVisibleBoxDecorations())
return false;
- if (!supportsDirectBoxDecorationsComposition(renderer()))
- return true;
-
- return false;
+ return !supportsDirectBoxDecorationsComposition(renderer());
}
bool RenderLayerBacking::paintsChildren() const
if (renderer().isTextControl())
return false;
- if (paintsBoxDecorations() || paintsChildren())
+ if (paintsNonDirectCompositedBoxDecoration() || paintsChildren())
return false;
+ if (renderer().style().backgroundClip() == TextFillBox)
+ return false;
+
if (renderer().isRenderNamedFlowFragmentContainer())
return false;
return box.paddingBoxRect();
case ContentFillBox:
return box.contentBoxRect();
- case TextFillBox:
+ default:
break;
}
return LayoutRect();
}
-FloatRect RenderLayerBacking::backgroundBoxForPainting() const
+FloatRect RenderLayerBacking::backgroundBoxForSimpleContainerPainting() const
{
if (!is<RenderBox>(renderer()))
return FloatRect();
LayoutSize devicePixelFractionFromRenderer() const { return m_devicePixelFractionFromRenderer; }
private:
- FloatRect backgroundBoxForPainting() const;
+ FloatRect backgroundBoxForSimpleContainerPainting() const;
void createPrimaryGraphicsLayer();
void destroyGraphicsLayers();
bool isMainFrameRenderViewLayer() const;
- bool paintsBoxDecorations() const;
+ bool paintsNonDirectCompositedBoxDecoration() const;
bool paintsChildren() const;
// Returns true if this compositing layer has no visible content.