Changeset 90029 in webkit


Ignore:
Timestamp:
Jun 29, 2011 11:30:07 AM (13 years ago)
Author:
enne@google.com
Message:

2011-06-29 Adrienne Walker <enne@google.com>

Reviewed by James Robinson.

[chromium] Divide by zero in TilingData
https://bugs.webkit.org/show_bug.cgi?id=63305

Add safety checks for empty layers.

  • platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::reset): (WebCore::LayerTilerChromium::updateRect):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90026 r90029  
     12011-06-29  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Divide by zero in TilingData
     6        https://bugs.webkit.org/show_bug.cgi?id=63305
     7
     8        Add safety checks for empty layers.
     9
     10        * platform/graphics/chromium/LayerTilerChromium.cpp:
     11        (WebCore::LayerTilerChromium::prepareToUpdate):
     12        (WebCore::LayerTilerChromium::reset):
     13        (WebCore::LayerTilerChromium::updateRect):
     14
    1152011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r89647 r90029  
    9797    m_unusedTiles.clear();
    9898    m_tilingData.setTotalSize(0, 0);
     99    m_paintRect = IntRect();
     100    m_updateRect = IntRect();
    99101}
    100102
     
    236238    invalidateTiles(contentRect);
    237239    growLayerToContain(contentRect);
     240
     241    if (!numTiles()) {
     242        m_updateRect = IntRect();
     243        return;
     244    }
    238245
    239246    // Create tiles as needed, expanding a dirty rect to contain all
     
    270277{
    271278    // Painting could cause compositing to get turned off, which may cause the tiler to become invalidated mid-update.
    272     if (!m_tilingData.totalSizeX() || !m_tilingData.totalSizeY() || m_updateRect.isEmpty())
     279    if (!m_tilingData.totalSizeX() || !m_tilingData.totalSizeY() || m_updateRect.isEmpty() || !numTiles())
    273280        return;
    274281
Note: See TracChangeset for help on using the changeset viewer.