Changeset 107360 in webkit


Ignore:
Timestamp:
Feb 9, 2012 10:08:40 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107358 r107360  
     12012-02-09  Dana Jansens  <danakj@chromium.org>
     2
     3        [Chromium] Assertion failure minX <= maxX in Region.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=78038
     5
     6        Reviewed by James Robinson.
     7
     8        Covered by existing tests (should make them stop asserting).
     9
     10        Clamp sizes for composited layers coming out of WebCore to make sure they are valid non-negative values.
     11
     12        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
     13        (WebCore::GraphicsLayerChromium::setSize):
     14
    1152012-02-09  Gregg Tavares  <gman@google.com>
    216
  • trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

    r105460 r107360  
    176176void GraphicsLayerChromium::setSize(const FloatSize& size)
    177177{
    178     if (size == m_size)
    179         return;
    180 
    181     GraphicsLayer::setSize(size);
     178    // We are receiving negative sizes here that cause assertions to fail in the compositor. Clamp them to 0 to
     179    // avoid those assertions.
     180    FloatSize clampedSize = size;
     181    if (clampedSize.isEmpty())
     182        clampedSize = FloatSize();
     183
     184    if (clampedSize == m_size)
     185        return;
     186
     187    GraphicsLayer::setSize(clampedSize);
    182188    updateLayerSize();
    183189}
Note: See TracChangeset for help on using the changeset viewer.