Changeset 138904 in webkit


Ignore:
Timestamp:
Jan 5, 2013 12:50:43 PM (11 years ago)
Author:
mkwst@chromium.org
Message:

seamless iframes don't take border into account properly and make the iframe too small.
https://bugs.webkit.org/show_bug.cgi?id=90827

Reviewed by Ojan Vafai.

Source/WebCore:

Seamless IFrames were incorrectly calculating their width; borders and
padding of the child document were accidentally left out of the end
result. This tiny patch adds the border/padding width to the calculated
width for the seamless IFrame, bringing things back into line with
expectations.

Test: fast/frames/seamless/seamless-border-padding.html

  • rendering/RenderIFrame.cpp:

(WebCore::RenderIFrame::minPreferredLogicalWidth):
(WebCore::RenderIFrame::maxPreferredLogicalWidth):

Add borderAndPaddingLogicalWidth() to the result of both methods.

LayoutTests:

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

This test checks the IFrame's handling of borders and padding.
Things work correctly for width after this patch, but there are
still issues with padding and height, which will be fixed in
http://wkbug.com/106167

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r138902 r138904  
     12013-01-05  Mike West  <mkwst@chromium.org>
     2
     3        seamless iframes don't take border into account properly and make the iframe too small.
     4        https://bugs.webkit.org/show_bug.cgi?id=90827
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * fast/frames/seamless/seamless-border-padding-expected.txt: Added.
     9        * fast/frames/seamless/seamless-border-padding.html: Added.
     10            This test checks the IFrame's handling of borders and padding.
     11            Things work correctly for width after this patch, but there are
     12            still issues with padding and height, which will be fixed in
     13            http://wkbug.com/106167
     14
    1152013-01-05  Min Qin  <qinmin@chromium.org>
    216
  • trunk/Source/WebCore/ChangeLog

    r138902 r138904  
     12013-01-05  Mike West  <mkwst@chromium.org>
     2
     3        seamless iframes don't take border into account properly and make the iframe too small.
     4        https://bugs.webkit.org/show_bug.cgi?id=90827
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Seamless IFrames were incorrectly calculating their width; borders and
     9        padding of the child document were accidentally left out of the end
     10        result. This tiny patch adds the border/padding width to the calculated
     11        width for the seamless IFrame, bringing things back into line with
     12        expectations.
     13
     14        Test: fast/frames/seamless/seamless-border-padding.html
     15
     16        * rendering/RenderIFrame.cpp:
     17        (WebCore::RenderIFrame::minPreferredLogicalWidth):
     18        (WebCore::RenderIFrame::maxPreferredLogicalWidth):
     19            Add borderAndPaddingLogicalWidth() to the result of both methods.
     20
    1212013-01-05  Min Qin  <qinmin@chromium.org>
    222
  • trunk/Source/WebCore/rendering/RenderIFrame.cpp

    r131938 r138904  
    6464        return 0;
    6565
    66     return childRoot->minPreferredLogicalWidth();
     66    return childRoot->minPreferredLogicalWidth() + borderAndPaddingLogicalWidth();
    6767}
    6868
     
    7676        return 0;
    7777
    78     return childRoot->maxPreferredLogicalWidth();
     78    return childRoot->maxPreferredLogicalWidth() + borderAndPaddingLogicalWidth();
    7979}
    8080
Note: See TracChangeset for help on using the changeset viewer.