Diff
Modified: trunk/Source/WebCore/ChangeLog (115906 => 115907)
--- trunk/Source/WebCore/ChangeLog 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebCore/ChangeLog 2012-05-02 23:15:41 UTC (rev 115907)
@@ -1,3 +1,18 @@
+2012-05-02 Fady Samuel <fsam...@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Make ViewportAttributes' layoutSize be a FloatRect to avoid rounding
+ too early, and the occasional off by one fixed layout dimensions.
+
+ * dom/ViewportArguments.cpp:
+ (WebCore::computeViewportAttributes):
+ * dom/ViewportArguments.h:
+ (ViewportAttributes):
+
2012-05-02 Joshua Bell <jsb...@chromium.org>
IndexedDB: Handle generated keys up to 2^53
Modified: trunk/Source/WebCore/dom/ViewportArguments.cpp (115906 => 115907)
--- trunk/Source/WebCore/dom/ViewportArguments.cpp 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebCore/dom/ViewportArguments.cpp 2012-05-02 23:15:41 UTC (rev 115907)
@@ -177,8 +177,8 @@
// Extend width and height to fill the visual viewport for the resolved initial-scale.
width = max<float>(width, availableWidth / result.initialScale);
height = max<float>(height, availableHeight / result.initialScale);
- result.layoutSize.setWidth(static_cast<int>(roundf(width)));
- result.layoutSize.setHeight(static_cast<int>(roundf(height)));
+ result.layoutSize.setWidth(width);
+ result.layoutSize.setHeight(height);
result.userScalable = args.userScalable;
Modified: trunk/Source/WebCore/dom/ViewportArguments.h (115906 => 115907)
--- trunk/Source/WebCore/dom/ViewportArguments.h 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebCore/dom/ViewportArguments.h 2012-05-02 23:15:41 UTC (rev 115907)
@@ -27,7 +27,7 @@
#ifndef ViewportArguments_h
#define ViewportArguments_h
-#include "IntSize.h"
+#include "FloatSize.h"
#include <wtf/Forward.h>
namespace WebCore {
@@ -43,7 +43,7 @@
};
struct ViewportAttributes {
- IntSize layoutSize;
+ FloatSize layoutSize;
float devicePixelRatio;
Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (115906 => 115907)
--- trunk/Source/WebKit/qt/Api/qwebpage.cpp 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp 2012-05-02 23:15:41 UTC (rev 115907)
@@ -2533,7 +2533,7 @@
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(conf);
result.m_isValid = true;
- result.m_size = conf.layoutSize;
+ result.m_size = QSizeF(conf.layoutSize.width(), conf.layoutSize.height());
result.m_initialScaleFactor = conf.initialScale;
result.m_minimumScaleFactor = conf.minimumScale;
result.m_maximumScaleFactor = conf.maximumScale;
Modified: trunk/Source/WebKit/qt/Api/qwebpage.h (115906 => 115907)
--- trunk/Source/WebKit/qt/Api/qwebpage.h 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit/qt/Api/qwebpage.h 2012-05-02 23:15:41 UTC (rev 115907)
@@ -232,7 +232,7 @@
inline qreal devicePixelRatio() const { return m_devicePixelRatio; }
inline bool isUserScalable() const { return m_isUserScalable; }
inline bool isValid() const { return m_isValid; }
- inline QSize size() const { return m_size; }
+ inline QSizeF size() const { return m_size; }
private:
QSharedDataPointer<QtViewportAttributesPrivate> d;
@@ -242,7 +242,7 @@
qreal m_devicePixelRatio;
bool m_isUserScalable;
bool m_isValid;
- QSize m_size;
+ QSizeF m_size;
friend class WebCore::ChromeClientQt;
friend class QWebPage;
Modified: trunk/Source/WebKit/qt/ChangeLog (115906 => 115907)
--- trunk/Source/WebKit/qt/ChangeLog 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-05-02 23:15:41 UTC (rev 115907)
@@ -1,3 +1,14 @@
+2012-05-02 Fady Samuel <fsam...@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
2012-05-02 Milian Wolff <milian.wo...@kdab.com>
[Qt] Pass page-height to PrintContext::begin to fix print layouting
Modified: trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp (115906 => 115907)
--- trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp 2012-05-02 23:15:41 UTC (rev 115907)
@@ -810,7 +810,7 @@
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(conf);
QString res;
- res = res.sprintf("viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n",
+ res = res.sprintf("viewport size %fx%f scale %f with limits [%f, %f] and userScalable %f\n",
conf.layoutSize.width(),
conf.layoutSize.height(),
conf.initialScale,
Modified: trunk/Source/WebKit2/ChangeLog (115906 => 115907)
--- trunk/Source/WebKit2/ChangeLog 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit2/ChangeLog 2012-05-02 23:15:41 UTC (rev 115907)
@@ -1,3 +1,15 @@
+2012-05-02 Fady Samuel <fsam...@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * UIProcess/API/qt/qwebviewportinfo.cpp:
+ (QWebViewportInfo::layoutSize):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::viewportConfigurationAsText):
+
2012-05-02 Emil A Eklund <e...@chromium.org>
Fix usage of layout types in platform code
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp (115906 => 115907)
--- trunk/Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp 2012-05-02 23:15:41 UTC (rev 115907)
@@ -77,7 +77,7 @@
QVariant QWebViewportInfo::layoutSize() const
{
- return QSize(m_webViewPrivate->attributes.layoutSize);
+ return QSizeF(m_webViewPrivate->attributes.layoutSize.width(), m_webViewPrivate->attributes.layoutSize.height());
}
void QWebViewportInfo::didUpdateContentsSize()
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (115906 => 115907)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-02 23:11:32 UTC (rev 115906)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-02 23:15:41 UTC (rev 115907)
@@ -892,7 +892,7 @@
ViewportAttributes attr = computeViewportAttributes(m_page->viewportArguments(), minimumLayoutFallbackWidth, settings->deviceWidth(), settings->deviceHeight(), settings->deviceDPI(), m_viewportSize);
- setResizesToContentsUsingLayoutSize(attr.layoutSize);
+ setResizesToContentsUsingLayoutSize(IntSize(static_cast<int>(attr.layoutSize.width()), static_cast<int>(attr.layoutSize.height())));
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
}
@@ -3052,7 +3052,7 @@
ViewportAttributes attrs = WebCore::computeViewportAttributes(arguments, /* default layout width for non-mobile pages */ 980, deviceWidth, deviceHeight, deviceDPI, IntSize(availableWidth, availableHeight));
WebCore::restrictMinimumScaleFactorToViewportSize(attrs, IntSize(availableWidth, availableHeight));
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(attrs);
- return String::format("viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
+ return String::format("viewport size %fx%f scale %f with limits [%f, %f] and userScalable %f\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
}
void WebPage::setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length)