Changeset 138976 in webkit


Ignore:
Timestamp:
Jan 7, 2013 12:33:53 PM (11 years ago)
Author:
pdr@google.com
Message:

Clear pending container size requests as early as possible
https://bugs.webkit.org/show_bug.cgi?id=106162

Reviewed by Eric Seidel.

http://trac.webkit.org/changeset/137981 contained a bug where pending container size
requests were only cleared for images that use container sizes. Bitmap images do not use
container sizes so these requests were not being cleared. This patch does the trivial
refactoring so that container size requests are cleared as early as possible.

No new tests as this is just a refactoring of some messy code added in r137981.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::createImage):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r138974 r138976  
     12013-01-07  Philip Rogers  <pdr@google.com>
     2
     3        Clear pending container size requests as early as possible
     4        https://bugs.webkit.org/show_bug.cgi?id=106162
     5
     6        Reviewed by Eric Seidel.
     7
     8        http://trac.webkit.org/changeset/137981 contained a bug where pending container size
     9        requests were only cleared for images that use container sizes. Bitmap images do not use
     10        container sizes so these requests were not being cleared. This patch does the trivial
     11        refactoring so that container size requests are cleared as early as possible.
     12
     13        No new tests as this is just a refactoring of some messy code added in r137981.
     14
     15        * loader/cache/CachedImage.cpp:
     16        (WebCore::CachedImage::createImage):
     17
    1182013-01-07  Sheriff Bot  <webkit.review.bot@gmail.com>
    219
  • trunk/Source/WebCore/loader/cache/CachedImage.cpp

    r138202 r138976  
    330330        m_image = BitmapImage::create(this);
    331331
    332     // Send queued container size requests.
    333     if (m_image && m_image->usesContainerSize()) {
    334         for (ContainerSizeRequests::iterator it = m_pendingContainerSizeRequests.begin(); it != m_pendingContainerSizeRequests.end(); ++it)
    335             setContainerSizeForRenderer(it->key, it->value.first, it->value.second);
     332    if (m_image) {
     333        // Send queued container size requests.
     334        if (m_image->usesContainerSize()) {
     335            for (ContainerSizeRequests::iterator it = m_pendingContainerSizeRequests.begin(); it != m_pendingContainerSizeRequests.end(); ++it)
     336                setContainerSizeForRenderer(it->key, it->value.first, it->value.second);
     337        }
    336338        m_pendingContainerSizeRequests.clear();
    337339    }
Note: See TracChangeset for help on using the changeset viewer.