Skip to content
Permalink
Browse files
[Chromium] Assertion failure minX <= maxX in Region.cpp
https://bugs.webkit.org/show_bug.cgi?id=78038

Patch by Dana Jansens <danakj@chromium.org> on 2012-02-09
Reviewed by James Robinson.

Covered by existing tests (should make them stop asserting).

Clamp sizes for composited layers coming out of WebCore to make sure they are valid non-negative values.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setSize):

Canonical link: https://commits.webkit.org/95232@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
danakj authored and webkit-commit-queue committed Feb 10, 2012
1 parent 8788658 commit ebc7a9065500307e2c06e69347f3c637360a4d3c
Showing 2 changed files with 22 additions and 2 deletions.
@@ -1,3 +1,17 @@
2012-02-09 Dana Jansens <danakj@chromium.org>

[Chromium] Assertion failure minX <= maxX in Region.cpp
https://bugs.webkit.org/show_bug.cgi?id=78038

Reviewed by James Robinson.

Covered by existing tests (should make them stop asserting).

Clamp sizes for composited layers coming out of WebCore to make sure they are valid non-negative values.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setSize):

2012-02-09 Gregg Tavares <gman@google.com>

Make WebGLRenderingContext::printWarningToConsole safer
@@ -175,10 +175,16 @@ void GraphicsLayerChromium::setAnchorPoint(const FloatPoint3D& point)

void GraphicsLayerChromium::setSize(const FloatSize& size)
{
if (size == m_size)
// We are receiving negative sizes here that cause assertions to fail in the compositor. Clamp them to 0 to
// avoid those assertions.
FloatSize clampedSize = size;
if (clampedSize.isEmpty())
clampedSize = FloatSize();

if (clampedSize == m_size)
return;

GraphicsLayer::setSize(size);
GraphicsLayer::setSize(clampedSize);
updateLayerSize();
}

0 comments on commit ebc7a90

Please sign in to comment.