Changeset 115907 in webkit
- Timestamp:
- May 2, 2012 4:15:41 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r115902 r115907 1 2012-05-02 Fady Samuel <fsamuel@chromium.org> 2 3 Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport 4 https://bugs.webkit.org/show_bug.cgi?id=70609 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Make ViewportAttributes' layoutSize be a FloatRect to avoid rounding 9 too early, and the occasional off by one fixed layout dimensions. 10 11 * dom/ViewportArguments.cpp: 12 (WebCore::computeViewportAttributes): 13 * dom/ViewportArguments.h: 14 (ViewportAttributes): 15 1 16 2012-05-02 Joshua Bell <jsbell@chromium.org> 2 17 -
trunk/Source/WebCore/dom/ViewportArguments.cpp
r113454 r115907 178 178 width = max<float>(width, availableWidth / result.initialScale); 179 179 height = max<float>(height, availableHeight / result.initialScale); 180 result.layoutSize.setWidth( static_cast<int>(roundf(width)));181 result.layoutSize.setHeight( static_cast<int>(roundf(height)));180 result.layoutSize.setWidth(width); 181 result.layoutSize.setHeight(height); 182 182 183 183 result.userScalable = args.userScalable; -
trunk/Source/WebCore/dom/ViewportArguments.h
r99195 r115907 28 28 #define ViewportArguments_h 29 29 30 #include " IntSize.h"30 #include "FloatSize.h" 31 31 #include <wtf/Forward.h> 32 32 … … 44 44 45 45 struct ViewportAttributes { 46 IntSize layoutSize;46 FloatSize layoutSize; 47 47 48 48 float devicePixelRatio; -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r115828 r115907 2534 2534 2535 2535 result.m_isValid = true; 2536 result.m_size = conf.layoutSize;2536 result.m_size = QSizeF(conf.layoutSize.width(), conf.layoutSize.height()); 2537 2537 result.m_initialScaleFactor = conf.initialScale; 2538 2538 result.m_minimumScaleFactor = conf.minimumScale; -
trunk/Source/WebKit/qt/Api/qwebpage.h
r96345 r115907 233 233 inline bool isUserScalable() const { return m_isUserScalable; } 234 234 inline bool isValid() const { return m_isValid; } 235 inline QSize size() const { return m_size; }235 inline QSizeF size() const { return m_size; } 236 236 237 237 private: … … 243 243 bool m_isUserScalable; 244 244 bool m_isValid; 245 QSize m_size;245 QSizeF m_size; 246 246 247 247 friend class WebCore::ChromeClientQt; -
trunk/Source/WebKit/qt/ChangeLog
r115832 r115907 1 2012-05-02 Fady Samuel <fsamuel@chromium.org> 2 3 Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport 4 https://bugs.webkit.org/show_bug.cgi?id=70609 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * Api/qwebpage.h: 9 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 10 (DumpRenderTreeSupportQt::viewportAsText): 11 1 12 2012-05-02 Milian Wolff <milian.wolff@kdab.com> 2 13 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r115210 r115907 811 811 812 812 QString res; 813 res = res.sprintf("viewport size % dx%dscale %f with limits [%f, %f] and userScalable %f\n",813 res = res.sprintf("viewport size %fx%f scale %f with limits [%f, %f] and userScalable %f\n", 814 814 conf.layoutSize.width(), 815 815 conf.layoutSize.height(), -
trunk/Source/WebKit2/ChangeLog
r115877 r115907 1 2012-05-02 Fady Samuel <fsamuel@chromium.org> 2 3 Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport 4 https://bugs.webkit.org/show_bug.cgi?id=70609 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * UIProcess/API/qt/qwebviewportinfo.cpp: 9 (QWebViewportInfo::layoutSize): 10 * WebProcess/WebPage/WebPage.cpp: 11 (WebKit::WebPage::viewportConfigurationAsText): 12 1 13 2012-05-02 Emil A Eklund <eae@chromium.org> 2 14 -
trunk/Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp
r114897 r115907 78 78 QVariant QWebViewportInfo::layoutSize() const 79 79 { 80 return QSize (m_webViewPrivate->attributes.layoutSize);80 return QSizeF(m_webViewPrivate->attributes.layoutSize.width(), m_webViewPrivate->attributes.layoutSize.height()); 81 81 } 82 82 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r115877 r115907 893 893 ViewportAttributes attr = computeViewportAttributes(m_page->viewportArguments(), minimumLayoutFallbackWidth, settings->deviceWidth(), settings->deviceHeight(), settings->deviceDPI(), m_viewportSize); 894 894 895 setResizesToContentsUsingLayoutSize( attr.layoutSize);895 setResizesToContentsUsingLayoutSize(IntSize(static_cast<int>(attr.layoutSize.width()), static_cast<int>(attr.layoutSize.height()))); 896 896 send(Messages::WebPageProxy::DidChangeViewportProperties(attr)); 897 897 } … … 3053 3053 WebCore::restrictMinimumScaleFactorToViewportSize(attrs, IntSize(availableWidth, availableHeight)); 3054 3054 WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(attrs); 3055 return String::format("viewport size % dx%dscale %f with limits [%f, %f] and userScalable %f\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);3055 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); 3056 3056 } 3057 3057
Note: See TracChangeset
for help on using the changeset viewer.