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)
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

index 67404beaa4449e32d7d3e7e87475d5d9ac156163..988e14b70e9aaaa2399e600c8091d4ace32f5701 100644 (file)
@@ -1,3 +1,34 @@
+2011-08-18  Fady Samuel  <fsamuel@chromium.org>
+
+        iframe and frameset scaling is broken
+        https://bugs.webkit.org/show_bug.cgi?id=57785
+
+        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.
+
 2011-08-17  Balazs Kelemen  <kbalazs@webkit.org>
 
         [Qt] Unreviewed gardening
diff --git a/LayoutTests/fast/frames/frame-set-scaling-3d-expected.png b/LayoutTests/fast/frames/frame-set-scaling-3d-expected.png
new file mode 100644 (file)
index 0000000..77e183f
Binary files /dev/null and b/LayoutTests/fast/frames/frame-set-scaling-3d-expected.png differ
diff --git a/LayoutTests/fast/frames/frame-set-scaling-3d-expected.txt b/LayoutTests/fast/frames/frame-set-scaling-3d-expected.txt
new file mode 100644 (file)
index 0000000..c883477
--- /dev/null
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderFrameSet {FRAMESET} at (0,0) size 800x600 [bgcolor=#FF0000]
+      RenderFrame {FRAME} at (0,0) size 238x600
+        layer at (0,0) size 238x600
+          RenderView at (0,0) size 238x600
+        layer at (0,0) size 238x600
+          RenderBlock {HTML} at (0,0) size 238x600
+            RenderBody {BODY} at (8,8) size 222x584 [bgcolor=#008000]
+      RenderFrame {FRAME} at (244,0) size 556x600
+        layer at (0,0) size 556x600
+          RenderView at (0,0) size 556x600
+        layer at (0,0) size 556x600
+          RenderBlock {HTML} at (0,0) size 556x600
+            RenderBody {BODY} at (8,8) size 540x584 [bgcolor=#008000]
diff --git a/LayoutTests/fast/frames/frame-set-scaling-3d.html b/LayoutTests/fast/frames/frame-set-scaling-3d.html
new file mode 100644 (file)
index 0000000..8c376a2
--- /dev/null
@@ -0,0 +1,6 @@
+<html><head><title>Frame Scale Test</title></head>
+  <frameset style="background-color: red; -webkit-transform-origin: 0% 0%; -webkit-transform:  scale(0.5, 0.5, 1.0);" cols="30%,*">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+  </frameset>
+</html>
diff --git a/LayoutTests/fast/frames/frame-set-scaling-centered-expected.png b/LayoutTests/fast/frames/frame-set-scaling-centered-expected.png
new file mode 100644 (file)
index 0000000..d8527e0
Binary files /dev/null and b/LayoutTests/fast/frames/frame-set-scaling-centered-expected.png differ
diff --git a/LayoutTests/fast/frames/frame-set-scaling-centered-expected.txt b/LayoutTests/fast/frames/frame-set-scaling-centered-expected.txt
new file mode 100644 (file)
index 0000000..4abaf8f
--- /dev/null
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600 [bgcolor=#FF0000]
+    RenderFrameSet {FRAMESET} at (0,0) size 800x600 [border: (5px solid #008000)]
+      RenderFrame {FRAME} at (0,0) size 238x600
+        layer at (0,0) size 238x600
+          RenderView at (0,0) size 238x600
+        layer at (0,0) size 238x600
+          RenderBlock {HTML} at (0,0) size 238x600
+            RenderBody {BODY} at (8,8) size 222x584 [bgcolor=#008000]
+      RenderFrame {FRAME} at (244,0) size 556x600
+        layer at (0,0) size 556x600
+          RenderView at (0,0) size 556x600
+        layer at (0,0) size 556x600
+          RenderBlock {HTML} at (0,0) size 556x600
+            RenderBody {BODY} at (8,8) size 540x584 [bgcolor=#008000]
diff --git a/LayoutTests/fast/frames/frame-set-scaling-centered.html b/LayoutTests/fast/frames/frame-set-scaling-centered.html
new file mode 100644 (file)
index 0000000..928fa99
--- /dev/null
@@ -0,0 +1,6 @@
+<html style="background-color: red; -webkit-transform:  scale(0.5, 0.5);"><head><title>Frame Scale Test</title></head>
+  <frameset style="border: 5px solid green;" cols="30%,*">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+  </frameset>
+</html>
diff --git a/LayoutTests/fast/frames/frame-set-scaling-expected.png b/LayoutTests/fast/frames/frame-set-scaling-expected.png
new file mode 100644 (file)
index 0000000..0fa1834
Binary files /dev/null and b/LayoutTests/fast/frames/frame-set-scaling-expected.png differ
diff --git a/LayoutTests/fast/frames/frame-set-scaling-expected.txt b/LayoutTests/fast/frames/frame-set-scaling-expected.txt
new file mode 100644 (file)
index 0000000..40367e2
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderFrameSet {FRAMESET} at (0,0) size 800x600 [bgcolor=#FF0000]
+    RenderFrame {FRAME} at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderView at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderBlock {HTML} at (0,0) size 238x600
+          RenderBody {BODY} at (8,8) size 222x584 [bgcolor=#008000]
+    RenderFrame {FRAME} at (244,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderView at (0,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderBlock {HTML} at (0,0) size 556x600
+          RenderBody {BODY} at (8,8) size 540x584 [bgcolor=#008000]
diff --git a/LayoutTests/fast/frames/frame-set-scaling-rotate-expected.png b/LayoutTests/fast/frames/frame-set-scaling-rotate-expected.png
new file mode 100644 (file)
index 0000000..48022cd
Binary files /dev/null and b/LayoutTests/fast/frames/frame-set-scaling-rotate-expected.png differ
diff --git a/LayoutTests/fast/frames/frame-set-scaling-rotate-expected.txt b/LayoutTests/fast/frames/frame-set-scaling-rotate-expected.txt
new file mode 100644 (file)
index 0000000..40367e2
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderFrameSet {FRAMESET} at (0,0) size 800x600 [bgcolor=#FF0000]
+    RenderFrame {FRAME} at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderView at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderBlock {HTML} at (0,0) size 238x600
+          RenderBody {BODY} at (8,8) size 222x584 [bgcolor=#008000]
+    RenderFrame {FRAME} at (244,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderView at (0,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderBlock {HTML} at (0,0) size 556x600
+          RenderBody {BODY} at (8,8) size 540x584 [bgcolor=#008000]
diff --git a/LayoutTests/fast/frames/frame-set-scaling-rotate.html b/LayoutTests/fast/frames/frame-set-scaling-rotate.html
new file mode 100644 (file)
index 0000000..ef32294
--- /dev/null
@@ -0,0 +1,6 @@
+<html><head><title>Frame Scale Test</title></head>
+  <frameset style="background-color: red; -webkit-transform: scale(0.5, 0.5) rotate(45deg);" cols="30%,*">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+  </frameset>
+</html>
diff --git a/LayoutTests/fast/frames/frame-set-scaling-skew-expected.png b/LayoutTests/fast/frames/frame-set-scaling-skew-expected.png
new file mode 100644 (file)
index 0000000..28fe468
Binary files /dev/null and b/LayoutTests/fast/frames/frame-set-scaling-skew-expected.png differ
diff --git a/LayoutTests/fast/frames/frame-set-scaling-skew-expected.txt b/LayoutTests/fast/frames/frame-set-scaling-skew-expected.txt
new file mode 100644 (file)
index 0000000..40367e2
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderFrameSet {FRAMESET} at (0,0) size 800x600 [bgcolor=#FF0000]
+    RenderFrame {FRAME} at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderView at (0,0) size 238x600
+      layer at (0,0) size 238x600
+        RenderBlock {HTML} at (0,0) size 238x600
+          RenderBody {BODY} at (8,8) size 222x584 [bgcolor=#008000]
+    RenderFrame {FRAME} at (244,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderView at (0,0) size 556x600
+      layer at (0,0) size 556x600
+        RenderBlock {HTML} at (0,0) size 556x600
+          RenderBody {BODY} at (8,8) size 540x584 [bgcolor=#008000]
diff --git a/LayoutTests/fast/frames/frame-set-scaling-skew.html b/LayoutTests/fast/frames/frame-set-scaling-skew.html
new file mode 100644 (file)
index 0000000..d66fde5
--- /dev/null
@@ -0,0 +1,6 @@
+<html><head><title>Frame Scale Test</title></head>
+  <frameset style="background-color: red; -webkit-transform: scale(0.5, 0.5) skew(30deg);" cols="30%,*">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+  </frameset>
+</html>
diff --git a/LayoutTests/fast/frames/frame-set-scaling.html b/LayoutTests/fast/frames/frame-set-scaling.html
new file mode 100644 (file)
index 0000000..2d4d843
--- /dev/null
@@ -0,0 +1,6 @@
+<html><head><title>Frame Scale Test</title></head>
+  <frameset style="background-color: red; -webkit-transform-origin: 0% 0%; -webkit-transform:  scale(0.5, 0.5);" cols="30%,*">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+    <frame src="data:text/html,<body bgcolor='green'></body>">
+  </frameset>
+</html>
diff --git a/LayoutTests/fast/frames/iframe-scaling-with-scroll.html b/LayoutTests/fast/frames/iframe-scaling-with-scroll.html
new file mode 100644 (file)
index 0000000..98ed667
--- /dev/null
@@ -0,0 +1,5 @@
+<html>
+<body>
+<iframe style="-webkit-transform-origin: 0% 0%;  position: absolute; width: 50%;  height: 50%; -webkit-transform:  scale(0.5, 0.5);" src="data:text/html,<body><div style='width: 1000px; height: 1000px; background-color: green;'></div></body>"></iframe>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.png b/LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.png
new file mode 100644 (file)
index 0000000..45f6f7f
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.txt b/LayoutTests/platform/chromium-linux/fast/frames/iframe-scaling-with-scroll-expected.txt
new file mode 100644 (file)
index 0000000..bd70cd0
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 404x304
+  RenderPartObject {IFRAME} at (8,8) size 404x304 [border: (2px inset #000000)]
+    layer at (0,0) size 1008x1016
+      RenderView at (0,0) size 385x285
+    layer at (0,0) size 385x1016
+      RenderBlock {HTML} at (0,0) size 385x1016
+        RenderBody {BODY} at (8,8) size 369x1000
+          RenderBlock {DIV} at (0,0) size 1000x1000 [bgcolor=#008000]
index 28ff9db795f70299c77a1262bc0be9876273da3a..855013ccc326e7b8682da1404e3ca5f83b65881c 100644 (file)
@@ -2968,6 +2968,9 @@ BUGCR78996 DEBUG : fast/css/first-of-type-pseudo-class.html = PASS TEXT
 // The merged test is flaky on Chromium since then.
 BUGCR78998 DEBUG : fast/frames/frame-element-name.html = PASS TEXT
 
+// Temporarily ignore fails until we generate a new baseline.
+BUGWK57785 WIN MAC : fast/frames/iframe-scaling-with-scroll.html = MISSING
+
 BUGWK58193 WIN7 : http/tests/local/fileapi/send-sliced-dragged-file.html = PASS TIMEOUT TEXT
 
 
diff --git a/LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.png b/LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.png
new file mode 100644 (file)
index 0000000..211488d
Binary files /dev/null and b/LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.txt b/LayoutTests/platform/mac/fast/frames/iframe-scaling-with-scroll-expected.txt
new file mode 100644 (file)
index 0000000..bd70cd0
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 404x304
+  RenderPartObject {IFRAME} at (8,8) size 404x304 [border: (2px inset #000000)]
+    layer at (0,0) size 1008x1016
+      RenderView at (0,0) size 385x285
+    layer at (0,0) size 385x1016
+      RenderBlock {HTML} at (0,0) size 385x1016
+        RenderBody {BODY} at (8,8) size 369x1000
+          RenderBlock {DIV} at (0,0) size 1000x1000 [bgcolor=#008000]
index 86445d084cb1ca7f2c9adf0fa233bc88206c211e..cfb907912a70f3913e8d4b46cfb605cff6ee6dab 100644 (file)
@@ -1,3 +1,32 @@
+2011-08-18  Fady Samuel  <fsamuel@chromium.org>
+
+        iframe and frameset scaling is broken
+        https://bugs.webkit.org/show_bug.cgi?id=57785
+
+        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.
+
 2011-08-18  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Unreviewed buildfix after r93268.
index 5bb22bb271f8397fd321989a52d242c7bef0d628..01c1af5d69699527e5255f8eac9a187a2a5b17b8 100644 (file)
@@ -36,6 +36,7 @@
 #include "MouseEvent.h"
 #include "PaintInfo.h"
 #include "RenderFrame.h"
+#include "RenderLayer.h"
 #include "RenderView.h"
 #include "Settings.h"
 
@@ -498,6 +499,12 @@ void RenderFrameSet::layout()
             view()->repaintViewRectangle(newBounds);
     }
 
+    // If this FrameSet has a transform matrix then we need to recompute it
+    // because the transform origin is a function the size of the RenderFrameSet
+    // which may not be computed until it is attached to the render tree.
+    if (layer() && hasTransform())
+        layer()->updateTransform();
+
     setNeedsLayout(false);
 }
 
index 68af59478f3d246ec5c5b677a115823c6bb5ca4b..7331e9de172dc9f6153deb32f491227f58926f2f 100644 (file)
@@ -3491,7 +3491,7 @@ IntRect RenderLayer::childrenClipRect() const
     RenderView* renderView = renderer()->view();
     RenderLayer* clippingRootLayer = clippingRoot();
     IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
-    calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
+    calculateRects(clippingRootLayer, renderView->unscaledDocumentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
     return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect)).enclosingBoundingBox();
 }
 
index 1554220817d7c3fe0f747cb82e62b871bf54a765..09b10dc2918bcf283f18f27cde43f0a30f3bc234 100644 (file)
@@ -185,8 +185,15 @@ void RenderWidget::setWidget(PassRefPtr<Widget> widget)
         // widget immediately, but we have to have really been fully constructed (with a non-null
         // style pointer).
         if (style()) {
-            if (!needsLayout())
-                setWidgetGeometry(IntRect(localToAbsoluteQuad(FloatQuad(contentBoxRect())).boundingBox()), contentBoxRect().size());
+            if (!needsLayout()) {
+                IntRect contentBox = contentBoxRect();
+                IntRect absoluteContentBox = IntRect(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox());
+                if (m_widget->isFrameView()) {
+                    contentBox.setLocation(absoluteContentBox.location());
+                    setWidgetGeometry(contentBox, contentBox.size());
+                } else
+                    setWidgetGeometry(absoluteContentBox, contentBox.size());
+            }
             if (style()->visibility() != VISIBLE)
                 m_widget->hide();
             else {
@@ -318,8 +325,13 @@ void RenderWidget::updateWidgetPosition()
 
     IntRect contentBox = contentBoxRect();
     IntRect absoluteContentBox = IntRect(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox());
-    bool boundsChanged = setWidgetGeometry(absoluteContentBox, contentBox.size());
-
+    bool boundsChanged;
+    if (m_widget->isFrameView()) {
+        contentBox.setLocation(absoluteContentBox.location());
+        boundsChanged = setWidgetGeometry(contentBox, contentBox.size());
+    } else
+        boundsChanged = setWidgetGeometry(absoluteContentBox, contentBox.size());
+    
     // if the frame bounds got changed, or if view needs layout (possibly indicating
     // content size is wrong) we have to do a layout to set the right widget size
     if (m_widget && m_widget->isFrameView()) {