Changeset 125050 in webkit


Ignore:
Timestamp:
Aug 8, 2012, 10:46:50 AM (13 years ago)
Author:
mitz@apple.com
Message:

REGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized incorrectly
https://bugs.webkit.org/show_bug.cgi?id=93388

Reviewed by Beth Dakin.

Source/WebCore:

Test: svg/css/max-width-3.html

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Added code to set
m_intrinsicSize in the no-contentRenderer branch of this function so that the calls to
RenderBox::computeReplacedLogical{Height,Width} in the end use the right intrinsic size.
This is similar to what the contentRenderer branch of this function already does.

LayoutTests:

  • svg/css/max-width-3-expected.html: Added.
  • svg/css/max-width-3.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r125048 r125050  
     12012-08-08  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=93388
     5
     6        Reviewed by Beth Dakin.
     7
     8        * svg/css/max-width-3-expected.html: Added.
     9        * svg/css/max-width-3.html: Added.
     10
    1112012-08-08  Keishi Hattori  <keishi@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r125048 r125050  
     12012-08-08  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=93388
     5
     6        Reviewed by Beth Dakin.
     7
     8        Test: svg/css/max-width-3.html
     9
     10        * rendering/RenderReplaced.cpp:
     11        (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Added code to set
     12        m_intrinsicSize in the no-contentRenderer branch of this function so that the calls to
     13        RenderBox::computeReplacedLogical{Height,Width} in the end use the right intrinsic size.
     14        This is similar to what the contentRenderer branch of this function already does.
     15
    1162012-08-08  Keishi Hattori  <keishi@webkit.org>
    217
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r123785 r125050  
    298298    } else {
    299299        computeIntrinsicRatioInformation(intrinsicSize, intrinsicRatio, isPercentageIntrinsicSize);
    300         if (intrinsicRatio)
     300        if (intrinsicRatio) {
    301301            ASSERT(!isPercentageIntrinsicSize);
     302            if (!intrinsicSize.isEmpty())
     303                m_intrinsicSize = isHorizontalWritingMode() ? flooredIntSize(intrinsicSize) : flooredIntSize(intrinsicSize).transposedSize(); // FIXME: This introduces precision errors. We should convert m_intrinsicSize to be a float.
     304        }
    302305    }
    303306
Note: See TracChangeset for help on using the changeset viewer.