diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:08:59 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:09:20 +0100 |
commit | 061d58bc0fa016cfeed744fd3e4663460635d69b (patch) | |
tree | ad9b8b032c803e1c9054c23fa1b7a0f1976bf98f /Source/WebKit/chromium/src | |
parent | 470286ecfe79d59df14944e5b5d34630fc739391 (diff) | |
download | qtwebkit-061d58bc0fa016cfeed744fd3e4663460635d69b.tar.gz |
Imported WebKit commit 8eb048315f36fa33731f28694630fe4a3c2cbc99 (http://svn.webkit.org/repository/webkit/trunk@135602)
New snapshot that fixes various bugs
Change-Id: Icb6ce541a26a9f500d087821ce4b83a8d8a5474a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r-- | Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm | 4 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp | 3 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp | 9 |
3 files changed, 2 insertions, 14 deletions
diff --git a/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm b/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm index 003c8eb6e..157c23192 100644 --- a/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm +++ b/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm @@ -95,11 +95,7 @@ WebScreenInfo WebScreenInfoFactory::screenInfo(NSView* view) WebScreenInfo results; - float deviceDPI = 160 * deviceScaleFactor(view); - results.horizontalDPI = deviceDPI; - results.verticalDPI = deviceDPI; results.deviceScaleFactor = static_cast<int>(deviceScaleFactor(view)); - results.depth = NSBitsPerPixelFromDepth([screen depth]); results.depthPerComponent = NSBitsPerSampleFromDepth([screen depth]); results.isMonochrome = diff --git a/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp b/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp index 5a6c11214..e2bcd23a2 100644 --- a/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp +++ b/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp @@ -65,8 +65,7 @@ WebScreenInfo WebScreenInfoFactory::screenInfo(HWND window) ASSERT(hdc); WebScreenInfo results; - results.horizontalDPI = GetDeviceCaps(hdc, LOGPIXELSX); - results.verticalDPI = GetDeviceCaps(hdc, LOGPIXELSY); + // FIXME: Initialize the device scale factor. results.depth = devMode.dmBitsPerPel; results.depthPerComponent = devMode.dmBitsPerPel / 3; // Assumes RGB results.isMonochrome = devMode.dmColor == DMCOLOR_MONOCHROME; diff --git a/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp b/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp index b6afa458b..49f3a96a5 100644 --- a/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp +++ b/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp @@ -44,7 +44,6 @@ namespace WebKit { // function, but it appears to return stale data after the screen is resized. WebScreenInfo WebScreenInfoFactory::screenInfo(Display* display, int screenNumber) { - const float inchesPerMillimeter = 25.4; // XDisplayWidth() and XDisplayHeight() return cached values. To ensure that // we return the correct dimensions after the screen is resized, query the // root window's geometry each time. @@ -56,14 +55,8 @@ WebScreenInfo WebScreenInfoFactory::screenInfo(Display* display, int screenNumbe display, root, &rootRet, &x, &y, &width, &height, &border, &depth); WebScreenInfo results; - int displayWidth = DisplayWidth(display, screenNumber); - int displayWidthInMillimeters = DisplayWidthMM(display, screenNumber); - results.horizontalDPI = static_cast<int>(inchesPerMillimeter * displayWidth / displayWidthInMillimeters); - - int displayHeight = DisplayHeight(display, screenNumber); - int displayHeightInMillimeters = DisplayHeightMM(display, screenNumber); - results.verticalDPI = static_cast<int>(inchesPerMillimeter * displayHeight / displayHeightInMillimeters); + // FIXME: Initialize the device scale factor. // FIXME: Not all screens use 8bpp. results.depthPerComponent = 8; results.depth = depth; |