iframe and frameset scaling is broken
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Aug 2011 07:23:11 +0000 (07:23 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Aug 2011 07:23:11 +0000 (07:23 +0000)
commitdd040cff65ee190e834f55cc07bd34704e0768d8
tree93b5df7f15c91ffd3f383e4303bc3c6d0ff1bea9
parentd4e50346e519e3671dfa1bba24b2be3d7bc24423
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/frames/frame-set-scaling-3d-expected.png [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-3d-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-3d.html [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-centered-expected.png [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-centered-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-centered.html [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-expected.png [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-rotate-expected.png [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-rotate-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-rotate.html [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-skew-expected.png [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-skew-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling-skew.html [new file with mode: 0644]
LayoutTests/fast/frames/frame-set-scaling.html [new file with mode: 0644]
LayoutTests/fast/frames/iframe-scaling-with-scroll.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderWidget.cpp