Title: [95612] trunk
Revision
95612
Author
commit-qu...@webkit.org
Date
2011-09-21 04:39:41 -0700 (Wed, 21 Sep 2011)

Log Message

Unreviewed, rolling out r95608.
http://trac.webkit.org/changeset/95608
https://bugs.webkit.org/show_bug.cgi?id=68521

breaks GTK and Windows builds. Please check EWS next time.
(Requested by philn-tp on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2011-09-21

Source/WebCore:

* html/HTMLBodyElement.cpp:
(WebCore::adjustForZoom):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::setScrollTop):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
(WebCore::DOMWindow::scrollTo):
* page/Frame.cpp:
(WebCore::Frame::pageScaleFactor):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::scrollXForFixedPosition):
(WebCore::FrameView::scrollYForFixedPosition):

LayoutTests:

* fast/events/scale-and-scroll-body-expected.png: Removed.
* fast/events/scale-and-scroll-body-expected.txt: Removed.
* fast/events/scale-and-scroll-body.html: Removed.
* fast/events/scale-and-scroll-iframe-body-expected.png: Removed.
* fast/events/scale-and-scroll-iframe-body-expected.txt: Removed.
* fast/events/scale-and-scroll-iframe-body.html: Removed.
* fast/events/scale-and-scroll-iframe-window-expected.png: Removed.
* fast/events/scale-and-scroll-iframe-window-expected.txt: Removed.
* fast/events/scale-and-scroll-iframe-window.html: Removed.
* fast/events/scale-and-scroll-window-expected.png: Removed.
* fast/events/scale-and-scroll-window-expected.txt: Removed.
* fast/events/scale-and-scroll-window.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (95611 => 95612)


--- trunk/LayoutTests/ChangeLog	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/ChangeLog	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,3 +1,25 @@
+2011-09-21  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r95608.
+        http://trac.webkit.org/changeset/95608
+        https://bugs.webkit.org/show_bug.cgi?id=68521
+
+        breaks GTK and Windows builds. Please check EWS next time.
+        (Requested by philn-tp on #webkit).
+
+        * fast/events/scale-and-scroll-body-expected.png: Removed.
+        * fast/events/scale-and-scroll-body-expected.txt: Removed.
+        * fast/events/scale-and-scroll-body.html: Removed.
+        * fast/events/scale-and-scroll-iframe-body-expected.png: Removed.
+        * fast/events/scale-and-scroll-iframe-body-expected.txt: Removed.
+        * fast/events/scale-and-scroll-iframe-body.html: Removed.
+        * fast/events/scale-and-scroll-iframe-window-expected.png: Removed.
+        * fast/events/scale-and-scroll-iframe-window-expected.txt: Removed.
+        * fast/events/scale-and-scroll-iframe-window.html: Removed.
+        * fast/events/scale-and-scroll-window-expected.png: Removed.
+        * fast/events/scale-and-scroll-window-expected.txt: Removed.
+        * fast/events/scale-and-scroll-window.html: Removed.
+
 2011-09-21  Philippe Normand  <pnorm...@igalia.com>
 
         Unreviewed, GTK baseslines for 2 new tests and skip a flaky svg test.

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-body-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-body-expected.txt (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-body-expected.txt	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-body-expected.txt	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,5 +0,0 @@
-PASS window.document.body.scrollTop is 100
-PASS window.document.body.scrollLeft is 100
-PASS window.scrollX is 100
-PASS window.scrollY is 100
-

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-body.html (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-body.html	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-body.html	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,51 +0,0 @@
-<html>
-<head>
-    <style>
-        ::-webkit-scrollbar {
-            width: 0px;
-            height: 0px;
-        }
-    </style>
-    <script>
-      window.enablePixelTesting = true;
-
-      function scroll() {
-          // The page scale, as set by EventSender.scalePageBy should not be apparent
-          // to _javascript_. So, we expect scrolling to (100,100) to be page coordinates, rather
-          // than device pixels.
-          document.body.scrollLeft = 100;
-          document.body.scrollTop = 100;
-
-          shouldBe("window.document.body.scrollTop", "100");
-          shouldBe("window.document.body.scrollLeft", "100");
-          shouldBe("window.scrollX", "100");
-          shouldBe("window.scrollY", "100");
-      }
-
-      function scaleWithEventSender() {
-          var scaleFactor = 2.0;
-          var scaleOffset = 0;
-          if (window.eventSender) {
-             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
-          }
-      }
-
-      function test() {
-          scaleWithEventSender();
-          scroll();
-      }
-    </script>
-    <script src=""
-</head>
-<body style="width:2000px; height:2000px; margin:0px;" _onload_="test();">
-    <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
-    <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
-    <div style="left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;"></div>
-
-    <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background: green;"></div>
-    <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
-    <div style="left:200px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
-
-    <div id="console"></div>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body-expected.txt (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body-expected.txt	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body-expected.txt	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,6 +0,0 @@
-
-PASS frame.contentDocument.body.scrollTop is 100
-PASS frame.contentDocument.body.scrollLeft is 100
-PASS frame.contentWindow.scrollX is 100
-PASS frame.contentWindow.scrollY is 100
-

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body.html (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body.html	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body.html	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,62 +0,0 @@
-<html>
-<head>
-    <style>
-        ::-webkit-scrollbar {
-            width: 0px;
-            height: 0px;
-        }
-    </style>
-    <script>
-        window.enablePixelTesting = true;
-
-        function scroll() {
-            window.scrollTo(0, 100);
-            var frame = document.getElementById('frame');
-            frame.contentDocument.body.scrollTop = 100;
-            frame.contentDocument.body.scrollLeft = 100;
-
-            shouldBe("frame.contentDocument.body.scrollTop", "100");
-            shouldBe("frame.contentDocument.body.scrollLeft", "100");
-            shouldBe("frame.contentWindow.scrollX", "100");
-            shouldBe("frame.contentWindow.scrollY", "100");
-        }
-
-        function scaleWithEventSender() {
-            var scaleFactor = 0.5;
-            var scaleOffset = 0;
-            if (window.eventSender) {
-                 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
-            }
-        }
-
-        function test() {
-            scaleWithEventSender();
-            scroll();
-        }
-    </script>
-    <script src=""
-</head>
-<body _onload_="test();" style="height: 2000px">
-    <iframe id="frame" style="width:400px; height: 400px; position: absolute; top: 100px;"></iframe>
-    <div id="console"></div>
-
-    <script>
-        var frame = document.getElementById('frame');
-        var doc = frame.contentDocument.open();
-        doc.write("<div style='left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;'></div>");
-        doc.write("<div style='left:100px; top:0; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:300px; top:0; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:400px; top:0; width:100px; height:100px; position:absolute; background:blue;'></div>");
-
-        doc.write("<div style='left:0; top:100px; width:100px; height:100px; position:absolute; background: green;'></div>");
-        doc.write("<div style='left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:200px; top:100px; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:300px; top:100px; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:400px; top:100px; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.close();
-        frame.contentDocument.body.style.width = "2000px";
-        frame.contentDocument.body.style.height = "2000px";
-    </script>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window-expected.txt (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window-expected.txt	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window-expected.txt	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,5 +0,0 @@
-PASS frame.contentDocument.body.scrollTop is 100
-PASS frame.contentDocument.body.scrollLeft is 100
-PASS frame.contentWindow.scrollX is 100
-PASS frame.contentWindow.scrollY is 100
-

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window.html (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window.html	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window.html	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,61 +0,0 @@
-<html>
-<head>
-    <style>
-        ::-webkit-scrollbar {
-            width: 0px;
-            height: 0px;
-        }
-    </style>
-    <script>
-        window.enablePixelTesting = true;
-
-        function scroll() {
-            window.scrollTo(0, 100);
-            var frame = document.getElementById('frame');
-            frame.contentWindow.scrollTo(100,100);
-
-            shouldBe("frame.contentDocument.body.scrollTop", "100");
-            shouldBe("frame.contentDocument.body.scrollLeft", "100");
-            shouldBe("frame.contentWindow.scrollX", "100");
-            shouldBe("frame.contentWindow.scrollY", "100");
-        }
-
-        function scaleWithEventSender() {
-            var scaleFactor = 0.5;
-            var scaleOffset = 0;
-            if (window.eventSender) {
-                 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
-            }
-        }
-
-        function test() {
-            scaleWithEventSender();
-            scroll();
-        }
-    </script>
-    <script src=""
-</head>
-<body _onload_="test();" style="height: 2000px">
-    <div id="console"></div>
-    <iframe id="frame" style="width:400px; height: 400px; position: absolute; top: 100px;"></iframe>
-
-    <script>
-        var frame = document.getElementById('frame');
-        var doc = frame.contentDocument.open();
-        doc.write("<div style='left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;'></div>");
-        doc.write("<div style='left:100px; top:0; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:300px; top:0; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:400px; top:0; width:100px; height:100px; position:absolute; background:blue;'></div>");
-
-        doc.write("<div style='left:0; top:100px; width:100px; height:100px; position:absolute; background: green;'></div>");
-        doc.write("<div style='left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:200px; top:100px; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.write("<div style='left:300px; top:100px; width:100px; height:100px; position:absolute; background:blue;'></div>");
-        doc.write("<div style='left:400px; top:100px; width:100px; height:100px; position:absolute; background:green;'></div>");
-        doc.close();
-        frame.contentDocument.body.style.width = "2000px";
-        frame.contentDocument.body.style.height = "2000px";
-    </script>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-window-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-window-expected.txt (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-window-expected.txt	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-window-expected.txt	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,5 +0,0 @@
-PASS window.document.body.scrollTop is 100
-PASS window.document.body.scrollLeft is 100
-PASS window.scrollX is 100
-PASS window.scrollY is 100
-

Deleted: trunk/LayoutTests/fast/events/scale-and-scroll-window.html (95611 => 95612)


--- trunk/LayoutTests/fast/events/scale-and-scroll-window.html	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/LayoutTests/fast/events/scale-and-scroll-window.html	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,50 +0,0 @@
-<html>
-<head>
-    <style>
-        ::-webkit-scrollbar {
-            width: 0px;
-            height: 0px;
-        }
-    </style>
-    <script>
-      window.enablePixelTesting = true;
-
-      function scroll() {
-          // The page scale, as set by EventSender.scalePageBy should not be apparent
-          // to _javascript_. So, we expect scrolling to (100,100) to be page coordinates, rather
-          // than device pixels.
-          window.scrollTo(100,100);
-
-          shouldBe("window.document.body.scrollTop", "100");
-          shouldBe("window.document.body.scrollLeft", "100");
-          shouldBe("window.scrollX", "100");
-          shouldBe("window.scrollY", "100");
-      }
-
-      function scaleWithEventSender() {
-          var scaleFactor = 2.0;
-          var scaleOffset = 0;
-          if (window.eventSender) {
-             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
-          }
-      }
-
-      function test() {
-          scaleWithEventSender();
-          scroll();
-      }
-    </script>
-    <script src=""
-</head>
-<body style="width:2000px; height:2000px; margin:0px;" _onload_="test();">
-    <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
-    <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
-    <div style="left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;"></div>
-
-    <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background: green;"></div>
-    <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
-    <div style="left:200px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
-
-    <div id="console"></div>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (95611 => 95612)


--- trunk/Source/WebCore/ChangeLog	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/ChangeLog	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1,3 +1,30 @@
+2011-09-21  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r95608.
+        http://trac.webkit.org/changeset/95608
+        https://bugs.webkit.org/show_bug.cgi?id=68521
+
+        breaks GTK and Windows builds. Please check EWS next time.
+        (Requested by philn-tp on #webkit).
+
+        * html/HTMLBodyElement.cpp:
+        (WebCore::adjustForZoom):
+        (WebCore::HTMLBodyElement::setScrollLeft):
+        (WebCore::HTMLBodyElement::setScrollTop):
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::scrollX):
+        (WebCore::DOMWindow::scrollY):
+        (WebCore::DOMWindow::scrollTo):
+        * page/Frame.cpp:
+        (WebCore::Frame::pageScaleFactor):
+        * page/Frame.h:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::applyOverflowToViewport):
+        (WebCore::FrameView::scrollXForFixedPosition):
+        (WebCore::FrameView::scrollYForFixedPosition):
+
 2011-09-21  Pavel Feldman  <pfeld...@google.com>
 
         Web Inspector: console panel's scroller is not properly aligned.

Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (95611 => 95612)


--- trunk/Source/WebCore/html/HTMLBodyElement.cpp	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp	2011-09-21 11:39:41 UTC (rev 95612)
@@ -267,7 +267,7 @@
 static int adjustForZoom(int value, Document* document)
 {
     Frame* frame = document->frame();
-    float zoomFactor = frame->pageZoomFactor() * frame->frameScaleFactor();
+    float zoomFactor = frame->pageZoomFactor() * frame->pageScaleFactor();
     if (zoomFactor == 1)
         return value;
     // Needed because of truncation (rather than rounding) when scaling up.
@@ -295,7 +295,7 @@
     FrameView* view = frame->view();
     if (!view)
         return;
-    view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), view->scrollY()));
+    view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor() * frame->pageScaleFactor()), view->scrollY()));
 }
 
 int HTMLBodyElement::scrollTop()
@@ -317,7 +317,7 @@
     FrameView* view = frame->view();
     if (!view)
         return;
-    view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor() * frame->frameScaleFactor())));
+    view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor() * frame->pageScaleFactor())));
 }
 
 int HTMLBodyElement::scrollHeight()

Modified: trunk/Source/WebCore/loader/HistoryController.cpp (95611 => 95612)


--- trunk/Source/WebCore/loader/HistoryController.cpp	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/loader/HistoryController.cpp	2011-09-21 11:39:41 UTC (rev 95612)
@@ -86,7 +86,7 @@
     else
         item->setScrollPoint(m_frame->view()->scrollPosition());
 
-    item->setPageScaleFactor(m_frame->frameScaleFactor());
+    item->setPageScaleFactor(m_frame->pageScaleFactor());
     
     // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client.
     m_frame->loader()->client()->saveViewStateToItem(item);

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (95611 => 95612)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1143,7 +1143,7 @@
 
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
-    return static_cast<int>(view->scrollX() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
+    return static_cast<int>(view->scrollX() / m_frame->pageZoomFactor());
 }
 
 int DOMWindow::scrollY() const
@@ -1157,7 +1157,7 @@
 
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
-    return static_cast<int>(view->scrollY() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
+    return static_cast<int>(view->scrollY() / m_frame->pageZoomFactor());
 }
 
 bool DOMWindow::closed() const
@@ -1384,8 +1384,8 @@
     if (!view)
         return;
 
-    int zoomedX = static_cast<int>(x * m_frame->pageZoomFactor() * m_frame->frameScaleFactor());
-    int zoomedY = static_cast<int>(y * m_frame->pageZoomFactor() * m_frame->frameScaleFactor());
+    int zoomedX = static_cast<int>(x * m_frame->pageZoomFactor());
+    int zoomedY = static_cast<int>(y * m_frame->pageZoomFactor());
     view->setScrollPosition(IntPoint(zoomedX, zoomedY));
 }
 

Modified: trunk/Source/WebCore/page/Frame.cpp (95611 => 95612)


--- trunk/Source/WebCore/page/Frame.cpp	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/page/Frame.cpp	2011-09-21 11:39:41 UTC (rev 95612)
@@ -1023,12 +1023,10 @@
         page->backForward()->markPagesForFullStyleRecalc();
 }
 
-float Frame::frameScaleFactor() const
+float Frame::pageScaleFactor() const
 {
     Page* page = this->page();
-
-    // Main frame is scaled with respect to he container but inner frames are not scaled with respect to the main frame.
-    if (!page || page->mainFrame() != this)
+    if (!page)
         return 1;
     return page->pageScaleFactor();
 }

Modified: trunk/Source/WebCore/page/Frame.h (95611 => 95612)


--- trunk/Source/WebCore/page/Frame.h	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/page/Frame.h	2011-09-21 11:39:41 UTC (rev 95612)
@@ -161,8 +161,8 @@
         float textZoomFactor() const { return m_textZoomFactor; }
         void setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor);
 
-        // Scale factor of this frame with respect to the container.
-        float frameScaleFactor() const;
+        // Convenience helper method that grabs the pageScaleFactor from Page.
+        float pageScaleFactor() const;
 
 #if USE(ACCELERATED_COMPOSITING)
         void deviceOrPageScaleFactorChanged();

Modified: trunk/Source/WebCore/page/FrameView.cpp (95611 => 95612)


--- trunk/Source/WebCore/page/FrameView.cpp	2011-09-21 11:37:06 UTC (rev 95611)
+++ trunk/Source/WebCore/page/FrameView.cpp	2011-09-21 11:39:41 UTC (rev 95612)
@@ -525,9 +525,9 @@
     // use the root element.
 
     // To combat the inability to scroll on a page with overflow:hidden on the root when scaled, disregard hidden when
-    // there is a frameScaleFactor that is greater than one on the main frame.
+    // there is a pageScaleFactor that is greater than one on the main frame.
 
-    bool overrideHidden = m_frame->page() && m_frame->frameScaleFactor() > 1;
+    bool overrideHidden = m_frame->page() && m_frame->page()->mainFrame() == m_frame && m_frame->pageScaleFactor() > 1;
 
     switch (o->style()->overflowX()) {
         case OHIDDEN:
@@ -1349,14 +1349,14 @@
     if (!m_frame)
         return x;
 
-    float frameScaleFactor = m_frame->frameScaleFactor();
+    float pageScaleFactor = m_frame->pageScaleFactor();
 
     // When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned
     // doesn't move as fast as the content view, so that when the content is scrolled all the way to the
     // end, the bottom of the scaled "viewport" touches the bottom of the real viewport.
-    float dragFactor = (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
+    float dragFactor = (contentsWidth() - visibleContentWidth * pageScaleFactor) / maxX;
 
-    return x * dragFactor / frameScaleFactor;
+    return x * dragFactor / pageScaleFactor;
 }
 
 LayoutUnit FrameView::scrollYForFixedPosition() const
@@ -1384,10 +1384,10 @@
     if (!m_frame)
         return y;
 
-    float frameScaleFactor = m_frame->frameScaleFactor();
-    float dragFactor = (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
+    float pageScaleFactor = m_frame->pageScaleFactor();
+    float dragFactor = (contentsHeight() - visibleContentHeight * pageScaleFactor) / maxY;
 
-    return y * dragFactor / frameScaleFactor;
+    return y * dragFactor / pageScaleFactor;
 }
 
 LayoutSize FrameView::scrollOffsetForFixedPosition() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to