Changeset 110091 in webkit


Ignore:
Timestamp:
Mar 7, 2012 1:02:44 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

RenderImage ignores its percent width/height when setContainerSizeForRenderer
https://bugs.webkit.org/show_bug.cgi?id=80431

Patch by Yong Li <yoli@rim.com> on 2012-03-07
Reviewed by George Staikos.

Not only respect fixed width/height explicitly specified in img element, but also
respect percent width/height when determining container size for images.

No new tests because there is no functional change but only internal buffer sizes.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::computeReplacedLogicalWidth):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110089 r110091  
     12012-03-07  Yong Li  <yoli@rim.com>
     2
     3        RenderImage ignores its percent width/height when setContainerSizeForRenderer
     4        https://bugs.webkit.org/show_bug.cgi?id=80431
     5
     6        Reviewed by George Staikos.
     7
     8        Not only respect fixed width/height explicitly specified in img element, but also
     9        respect percent width/height when determining container size for images.
     10
     11        No new tests because there is no functional change but only internal buffer sizes.
     12
     13        * rendering/RenderImage.cpp:
     14        (WebCore::RenderImage::computeReplacedLogicalWidth):
     15
    1162012-03-06  Benjamin Poulain  <bpoulain@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r109278 r110091  
    505505LayoutUnit RenderImage::computeReplacedLogicalWidth(bool includeMaxWidth) const
    506506{
    507     // If we've got an explicit width/height assigned, propagate it to the image resource.   
    508     if (style()->logicalWidth().isFixed() && style()->logicalHeight().isFixed()) {
     507    // If we've got an explicit width/height assigned, propagate it to the image resource.
     508    if (style()->logicalWidth().isSpecified() && style()->logicalHeight().isSpecified()) {
    509509        LayoutUnit width = RenderReplaced::computeReplacedLogicalWidth(includeMaxWidth);
    510510        m_imageResource->setContainerSizeForRenderer(IntSize(width, computeReplacedLogicalHeight()));
Note: See TracChangeset for help on using the changeset viewer.