Title: [150643] trunk
- Revision
- 150643
- Author
- [email protected]
- Date
- 2013-05-24 09:34:46 -0700 (Fri, 24 May 2013)
Log Message
WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=115135
Patch by Noam Rosenthal <[email protected]> on 2013-05-24
Reviewed by Antti Koivisto.
Source/WebCore:
Issue is invoked when there is a visibility:hidden layer with a non-compositable
background image (e.g. a radial gradient).
The layer is treated as a no-contents layer because of its visibility, however
updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
with direct background-image compositing.
Fixed by returning early from updating directly composited contents for layers
with hidden contents.
Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
LayoutTests:
Added a ref-test that makes sure that a layer with a hidden radial gradient does not
cause the web process to crash.
* compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html: Added.
* compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (150642 => 150643)
--- trunk/LayoutTests/ChangeLog 2013-05-24 16:18:16 UTC (rev 150642)
+++ trunk/LayoutTests/ChangeLog 2013-05-24 16:34:46 UTC (rev 150643)
@@ -1,3 +1,16 @@
+2013-05-24 Noam Rosenthal <[email protected]>
+
+ WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=115135
+
+ Reviewed by Antti Koivisto.
+
+ Added a ref-test that makes sure that a layer with a hidden radial gradient does not
+ cause the web process to crash.
+
+ * compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html: Added.
+ * compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html: Added.
+
2013-05-24 Gabor Abraham <[email protected]>
[Qt] Unreviewed gardening. Update qt-5.0-wk2 expected pictures after r150506.
Added: trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html (0 => 150643)
--- trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html 2013-05-24 16:34:46 UTC (rev 150643)
@@ -0,0 +1,14 @@
+<html lang="en">
+<head>
+ <style>
+ .composited { -webkit-transform: rotate3d(0, 0, 1, 0); }
+ .test {
+ height: 200px;
+ width: 260px;
+ }
+ </style>
+</head>
+<body>
+ <div class="test" style="visibility: hidden; background-image: radial-gradient(black, white)"></div>
+</body>
+</html>
Added: trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html (0 => 150643)
--- trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html (rev 0)
+++ trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html 2013-05-24 16:34:46 UTC (rev 150643)
@@ -0,0 +1,14 @@
+<html lang="en">
+<head>
+ <style>
+ .composited { -webkit-transform: rotate3d(0, 0, 1, 0); }
+ .test {
+ height: 200px;
+ width: 260px;
+ }
+ </style>
+</head>
+<body>
+ <div class="test composited" style="visibility: hidden; background-image: radial-gradient(black, white)"></div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (150642 => 150643)
--- trunk/Source/WebCore/ChangeLog 2013-05-24 16:18:16 UTC (rev 150642)
+++ trunk/Source/WebCore/ChangeLog 2013-05-24 16:34:46 UTC (rev 150643)
@@ -1,3 +1,27 @@
+2013-05-24 Noam Rosenthal <[email protected]>
+
+ WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=115135
+
+ Reviewed by Antti Koivisto.
+
+ Issue is invoked when there is a visibility:hidden layer with a non-compositable
+ background image (e.g. a radial gradient).
+ The layer is treated as a no-contents layer because of its visibility, however
+ updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
+ with direct background-image compositing.
+
+ Fixed by returning early from updating directly composited contents for layers
+ with hidden contents.
+
+ Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
+ (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
+ (WebCore::RenderLayerBacking::paintsChildren):
+ (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
+
2013-05-24 Robert Hogan <[email protected]>
Refactor shouldAddBorderPaddingMargin()
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (150642 => 150643)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-05-24 16:18:16 UTC (rev 150642)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-05-24 16:34:46 UTC (rev 150643)
@@ -872,6 +872,9 @@
void RenderLayerBacking::updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect)
{
+ if (!m_owningLayer->hasVisibleContent())
+ return;
+
updateDirectlyCompositedBackgroundImage(isSimpleContainer, didUpdateContentsRect);
updateDirectlyCompositedBackgroundColor(isSimpleContainer, didUpdateContentsRect);
}
@@ -1458,6 +1461,7 @@
IntRect destRect = backgroundBox();
IntPoint phase;
IntSize tileSize;
+
RefPtr<Image> image = style->backgroundLayers()->image()->cachedImage()->image();
toRenderBox(renderer())->getGeometryForBackgroundImage(destRect, phase, tileSize);
m_graphicsLayer->setContentsTileSize(tileSize);
@@ -1523,7 +1527,7 @@
{
if (m_owningLayer->hasVisibleContent() && m_owningLayer->hasNonEmptyChildRenderers())
return true;
-
+
if (hasVisibleNonCompositingDescendantLayers())
return true;
@@ -1675,7 +1679,7 @@
bool RenderLayerBacking::isDirectlyCompositedImage() const
{
RenderObject* renderObject = renderer();
-
+
if (!renderObject->isImage() || m_owningLayer->hasBoxDecorationsOrBackground() || renderObject->hasClip())
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes