Ignore:
Timestamp:
Aug 18, 2011, 12:23:11 AM (14 years ago)
Author:
[email protected]
Message:

iframe and frameset scaling is broken
https://bugs.webkit.org/show_bug.cgi?id=57785

Source/WebCore:

Reviewed by Simon Fraser.

Fixed two iframe and frameset scaling bugs:

#1 iframes and frameset backgrounds and scroll areas are doubly scaled when they are styled with -webkit-transform.
#2 frameset does not respect -webkit-transform-origin when scaled

Tests: fast/frames/frame-set-scaling-3d.html

fast/frames/frame-set-scaling-centered.html
fast/frames/frame-set-scaling-rotate.html
fast/frames/frame-set-scaling-skew.html
fast/frames/frame-set-scaling.html
fast/frames/iframe-scaling-with-scroll.html

  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::layout):
Update the FrameSet's layer transform after we've computed size to correctly account for the transform origin.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::childrenClipRect):
The dirty rect should be the document's unscaled size.

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::updateWidgetPosition):
Don't scale the FrameView rect here. Scaling is done within the FrameView.

LayoutTests:

Added tests to verify that framesets and iframes are scaled and positioned correctly.

Reviewed by Simon Fraser.

  • fast/frames/frame-set-scaling-3d-expected.png: Added.
  • fast/frames/frame-set-scaling-3d-expected.txt: Added.
  • fast/frames/frame-set-scaling-3d.html: Added.
  • fast/frames/frame-set-scaling-centered-expected.png: Added.
  • fast/frames/frame-set-scaling-centered-expected.txt: Added.
  • fast/frames/frame-set-scaling-centered.html: Added.
  • fast/frames/frame-set-scaling-expected.png: Added.
  • fast/frames/frame-set-scaling-expected.txt: Added.
  • fast/frames/frame-set-scaling-rotate-expected.png: Added.
  • fast/frames/frame-set-scaling-rotate-expected.txt: Added.
  • fast/frames/frame-set-scaling-rotate.html: Added.
  • fast/frames/frame-set-scaling-skew-expected.png: Added.
  • fast/frames/frame-set-scaling-skew-expected.txt: Added.
  • fast/frames/frame-set-scaling-skew.html: Added.
  • fast/frames/frame-set-scaling.html: Added.
  • fast/frames/iframe-scaling-with-scroll.html: Added.
  • platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.png: Added.
  • platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.txt: Added.
  • platform/chromium/test_expectations.txt:
  • platform/mac/fast/frames/iframe-scaling-with-scroll-expected.png: Added.
  • platform/mac/fast/frames/iframe-scaling-with-scroll-expected.txt: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r90515 r93287  
    3737#include "PaintInfo.h"
    3838#include "RenderFrame.h"
     39#include "RenderLayer.h"
    3940#include "RenderView.h"
    4041#include "Settings.h"
     
    499500    }
    500501
     502    // If this FrameSet has a transform matrix then we need to recompute it
     503    // because the transform origin is a function the size of the RenderFrameSet
     504    // which may not be computed until it is attached to the render tree.
     505    if (layer() && hasTransform())
     506        layer()->updateTransform();
     507
    501508    setNeedsLayout(false);
    502509}
Note: See TracChangeset for help on using the changeset viewer.