Changeset 138917 in webkit


Ignore:
Timestamp:
Jan 6, 2013 1:43:11 AM (11 years ago)
Author:
mkwst@chromium.org
Message:

Seamless: IFrame's padding isn't taken into account when calculating its height.
https://bugs.webkit.org/show_bug.cgi?id=106167

Reviewed by Eric Seidel.

Source/WebCore:

IFrames rendered seamlessly don't currently calculate their height
correctly when padding is applied to the frame itself. This patch adds
padding calculations to RenderIFrame::layoutSeamlessly to ensure that
the seamless frame is correctly sized.

  • rendering/RenderIFrame.cpp:

(WebCore::RenderIFrame::layoutSeamlessly):

LayoutTests:

  • fast/frames/seamless/seamless-border-padding-expected.txt:

Adjusts the previously failing expectations to the correct values.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r138912 r138917  
     12013-01-06  Mike West  <mkwst@chromium.org>
     2
     3        Seamless: IFrame's padding isn't taken into account when calculating its height.
     4        https://bugs.webkit.org/show_bug.cgi?id=106167
     5
     6        Reviewed by Eric Seidel.
     7
     8        * fast/frames/seamless/seamless-border-padding-expected.txt:
     9            Adjusts the previously failing expectations to the correct values.
     10
    1112013-01-05  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/LayoutTests/fast/frames/seamless/seamless-border-padding-expected.txt

    r138904 r138917  
    55PASS hasborder.getBoundingClientRect().height is 102
    66PASS haspadding.getBoundingClientRect().width is 104
    7 FAIL haspadding.getBoundingClientRect().height should be 104. Was 100.
     7PASS haspadding.getBoundingClientRect().height is 104
    88PASS hasboth.getBoundingClientRect().width is 106
    9 FAIL hasboth.getBoundingClientRect().height should be 106. Was 102.
     9PASS hasboth.getBoundingClientRect().height is 106
    1010     
  • trunk/Source/WebCore/ChangeLog

    r138916 r138917  
     12013-01-06  Mike West  <mkwst@chromium.org>
     2
     3        Seamless: IFrame's padding isn't taken into account when calculating its height.
     4        https://bugs.webkit.org/show_bug.cgi?id=106167
     5
     6        Reviewed by Eric Seidel.
     7
     8        IFrames rendered seamlessly don't currently calculate their height
     9        correctly when padding is applied to the frame itself. This patch adds
     10        padding calculations to RenderIFrame::layoutSeamlessly to ensure that
     11        the seamless frame is correctly sized.
     12
     13        * rendering/RenderIFrame.cpp:
     14        (WebCore::RenderIFrame::layoutSeamlessly):
     15
    1162013-01-05  Ryosuke Niwa  <rniwa@webkit.org>
    217
  • trunk/Source/WebCore/rendering/RenderIFrame.cpp

    r138904 r138917  
    131131
    132132    // Laying out our kids is normally responsible for adjusting our height, so we set it here.
    133     // Replaced elements do not respect padding, so we just add border to the child's height.
    134     // FIXME: It's possible that seamless iframes (since they act like divs) *should* respect padding.
     133    // Replaced elements normally do not respect padding, but seamless elements should: we'll add
     134    // both padding and border to the child's logical height here.
    135135    FrameView* childFrameView = static_cast<FrameView*>(widget());
    136136    if (childFrameView) // Widget should never be null during layout(), but just in case.
    137         setLogicalHeight(childFrameView->contentsHeight() + borderTop() + borderBottom());
     137        setLogicalHeight(childFrameView->contentsHeight() + borderTop() + borderBottom() + paddingTop() + paddingBottom());
    138138    updateLogicalHeight();
    139139
Note: See TracChangeset for help on using the changeset viewer.