Changeset 88009 in webkit


Ignore:
Timestamp:
Jun 3, 2011 5:43:26 AM (13 years ago)
Author:
Nikolas Zimmermann
Message:

2011-06-03 Nikolas Zimmermann <nzimmermann@rim.com>

Reviewed by Andreas Kling.

Incorrect embedded document replaced size calculation for box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=62007

When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
which has an intrinsic width/height, the embedded document intrinsic size is incorrect.

  • platform/mac/svg/as-image/img-preserveAspectRatio-support-2-expected.png: Added.
  • platform/mac/svg/as-image/img-preserveAspectRatio-support-2-expected.txt: Added.
  • platform/mac/svg/as-object: Added.
  • platform/mac/svg/as-object/object-box-sizing-no-width-height-expected.png: Added.
  • platform/mac/svg/as-object/object-box-sizing-no-width-height-expected.txt: Added.
  • svg/as-image/img-preserveAspectRatio-support-2.html: Added.
  • svg/as-image/resources/circle-default-default.svg: Added.
  • svg/as-object: Added.
  • svg/as-object/object-box-sizing-no-width-height.html: Added.

2011-06-03 Nikolas Zimmermann <nzimmermann@rim.com>

Reviewed by Andreas Kling.

Incorrect embedded document replaced size calculation for box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=62007

When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
which has an intrinsic width/height, the embedded document intrinsic size is incorrect.

RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves.

Tests: svg/as-image/img-preserveAspectRatio-support-2.html

svg/as-object/object-box-sizing-no-width-height.html

  • rendering/RenderPart.cpp: (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth): (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
Location:
trunk
Files:
9 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88008 r88009  
     12011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Incorrect embedded document replaced size calculation for box-sizing: border-box
     6        https://bugs.webkit.org/show_bug.cgi?id=62007
     7
     8        When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
     9        which has an intrinsic width/height, the embedded document intrinsic size is incorrect.
     10
     11        * platform/mac/svg/as-image/img-preserveAspectRatio-support-2-expected.png: Added.
     12        * platform/mac/svg/as-image/img-preserveAspectRatio-support-2-expected.txt: Added.
     13        * platform/mac/svg/as-object: Added.
     14        * platform/mac/svg/as-object/object-box-sizing-no-width-height-expected.png: Added.
     15        * platform/mac/svg/as-object/object-box-sizing-no-width-height-expected.txt: Added.
     16        * svg/as-image/img-preserveAspectRatio-support-2.html: Added.
     17        * svg/as-image/resources/circle-default-default.svg: Added.
     18        * svg/as-object: Added.
     19        * svg/as-object/object-box-sizing-no-width-height.html: Added.
     20
    1212011-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
    222
  • trunk/Source/WebCore/ChangeLog

    r88008 r88009  
     12011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Incorrect embedded document replaced size calculation for box-sizing: border-box
     6        https://bugs.webkit.org/show_bug.cgi?id=62007
     7
     8        When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
     9        which has an intrinsic width/height, the embedded document intrinsic size is incorrect.
     10
     11        RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves.
     12
     13        Tests: svg/as-image/img-preserveAspectRatio-support-2.html
     14               svg/as-object/object-box-sizing-no-width-height.html
     15
     16        * rendering/RenderPart.cpp:
     17        (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
     18        (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
     19
    1202011-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
    221
  • trunk/Source/WebCore/rendering/RenderPart.cpp

    r87801 r88009  
    117117    ASSERT(contentRenderer);
    118118    ASSERT(contentRenderer->style());
    119     return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing(contentRenderer->style()->logicalWidth()), includeMaxWidth);
     119    return contentRenderer->computeReplacedLogicalWidthRespectingMinMaxWidth(contentRenderer->computeReplacedLogicalWidthUsing(contentRenderer->style()->logicalWidth()), includeMaxWidth);
    120120}
    121121
     
    124124    ASSERT(contentRenderer);
    125125    ASSERT(contentRenderer->style());
    126     return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing(contentRenderer->style()->logicalHeight()));
     126    return contentRenderer->computeReplacedLogicalHeightRespectingMinMaxHeight(contentRenderer->computeReplacedLogicalHeightUsing(contentRenderer->style()->logicalHeight()));
    127127}
    128128
Note: See TracChangeset for help on using the changeset viewer.