[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
timothy at apple.com
timothy at apple.com
Wed Jan 20 22:28:15 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit c21f96247a5b30d4a19396e1ea1cdbee3a1564c3
Author: timothy at apple.com <timothy at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 18 21:30:35 2010 +0000
Adjust the scroll position when doing a full page zoom, so the content
stays in relatively the same position.
<rdar://problem/6150099> Zooming should keep the page content in the same place
Reviewed by Oliver Hunt.
* page/Frame.cpp:
(WebCore::Frame::setZoomFactor): Apply the zoom percent difference to
the scroll position, only when doing a full page zoom.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 149344e..89b24c2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-18 Timothy Hatcher <timothy at apple.com>
+
+ Updated results for scroll position while zoomed.
+
+ <rdar://problem/6150099> Zooming should keep the page content in the same place
+
+ Rubber-stamped by Sam Weinig.
+
+ * fast/css/zoom-body-scroll-expected.txt:
+
2010-01-18 Adam Roben <aroben at apple.com>
Add tests for new WebKit SPI to disallow setting document.domain
diff --git a/LayoutTests/fast/css/zoom-body-scroll-expected.txt b/LayoutTests/fast/css/zoom-body-scroll-expected.txt
index 3888268..7403b56 100644
--- a/LayoutTests/fast/css/zoom-body-scroll-expected.txt
+++ b/LayoutTests/fast/css/zoom-body-scroll-expected.txt
@@ -10,12 +10,12 @@ Zooming in
scrollHeight: 1000
scrollWidth: 1000
scrollTop: 0
-scrollLeft: 42
+scrollLeft: 50
Scrolling down to 100
scrollTop: 100
Zooming back out
-scrollTop: 120
+scrollTop: 100
scrollLeft: 50
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6d65922..5a890a0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-18 Timothy Hatcher <timothy at apple.com>
+
+ Adjust the scroll position when doing a full page zoom, so the content
+ stays in relatively the same position.
+
+ <rdar://problem/6150099> Zooming should keep the page content in the same place
+
+ Reviewed by Oliver Hunt.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setZoomFactor): Apply the zoom percent difference to
+ the scroll position, only when doing a full page zoom.
+
2010-01-18 Adam Roben <aroben at apple.com>
Add SecurityOrigin::{set,is}DomainRelaxationForbiddenForURLScheme and
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 9625ca6..dd2aae5 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -681,6 +681,13 @@ void Frame::setZoomFactor(float percent, bool isTextOnly)
}
#endif
+ if (!isTextOnly) {
+ // Update the scroll position when doing a full page zoom, so the content stays in relatively the same position.
+ IntPoint scrollPosition = view()->scrollPosition();
+ float percentDifference = (percent / m_zoomFactor);
+ view()->setScrollPosition(IntPoint(scrollPosition.x() * percentDifference, scrollPosition.y() * percentDifference));
+ }
+
m_zoomFactor = percent;
m_page->settings()->setZoomsTextOnly(isTextOnly);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list