Diff
Modified: trunk/Source/Platform/ChangeLog (135579 => 135580)
--- trunk/Source/Platform/ChangeLog 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/Platform/ChangeLog 2012-11-23 11:15:59 UTC (rev 135580)
@@ -1,3 +1,16 @@
+2012-11-23 Sami Kyostila <[email protected]>
+
+ [chromium] Remove WebScreenInfo.{horizontal,vertical}DPI
+ https://bugs.webkit.org/show_bug.cgi?id=101772
+
+ Reviewed by Adam Barth.
+
+ Now that nothing is using WebScreenInfo.{horizontal,vertical}DPI we can simply
+ remove them.
+
+ * chromium/public/WebScreenInfo.h:
+ (WebKit::WebScreenInfo::WebScreenInfo):
+
2012-11-22 David Reveman <[email protected]>
[Chromium] Add GL_CHROMIUM_pixel_transfer_buffer_object extension support.
Modified: trunk/Source/Platform/chromium/public/WebScreenInfo.h (135579 => 135580)
--- trunk/Source/Platform/chromium/public/WebScreenInfo.h 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/Platform/chromium/public/WebScreenInfo.h 2012-11-23 11:15:59 UTC (rev 135580)
@@ -36,12 +36,6 @@
namespace WebKit {
struct WebScreenInfo {
- // The horizontal screen dpi (deprecated).
- int horizontalDPI;
-
- // The vertical screen dpi (deprecated).
- int verticalDPI;
-
// Device scale factor. Specifies the ratio between physical and logical
// pixels.
float deviceScaleFactor;
@@ -74,9 +68,7 @@
WebRect availableRect;
WebScreenInfo()
- : horizontalDPI(0)
- , verticalDPI(0)
- , deviceScaleFactor(1)
+ : deviceScaleFactor(1)
, depth(0)
, depthPerComponent(0)
, isMonochrome(false) { }
Modified: trunk/Source/WebKit/chromium/ChangeLog (135579 => 135580)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-11-23 11:15:59 UTC (rev 135580)
@@ -1,3 +1,20 @@
+2012-11-23 Sami Kyostila <[email protected]>
+
+ [chromium] Remove WebScreenInfo.{horizontal,vertical}DPI
+ https://bugs.webkit.org/show_bug.cgi?id=101772
+
+ Reviewed by Adam Barth.
+
+ Now that nothing is using WebScreenInfo.{horizontal,vertical}DPI we can simply
+ remove them.
+
+ * src/mac/WebScreenInfoFactory.mm:
+ (WebKit::WebScreenInfoFactory::screenInfo):
+ * src/win/WebScreenInfoFactory.cpp:
+ (WebKit::WebScreenInfoFactory::screenInfo):
+ * src/x11/WebScreenInfoFactory.cpp:
+ (WebKit::WebScreenInfoFactory::screenInfo):
+
2012-11-22 Sheriff Bot <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm (135579 => 135580)
--- trunk/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/WebKit/chromium/src/mac/WebScreenInfoFactory.mm 2012-11-23 11:15:59 UTC (rev 135580)
@@ -95,11 +95,7 @@
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 =
Modified: trunk/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp (135579 => 135580)
--- trunk/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp 2012-11-23 11:15:59 UTC (rev 135580)
@@ -65,8 +65,7 @@
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;
Modified: trunk/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp (135579 => 135580)
--- trunk/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp 2012-11-23 11:15:59 UTC (rev 135580)
@@ -44,7 +44,6 @@
// 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 @@
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;
Modified: trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp (135579 => 135580)
--- trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp 2012-11-23 11:10:04 UTC (rev 135579)
+++ trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp 2012-11-23 11:15:59 UTC (rev 135580)
@@ -293,7 +293,7 @@
registerMockedHttpURLLoad("scale_oscillate.html");
FixedLayoutTestWebViewClient client;
- client.m_screenInfo.horizontalDPI = 212;
+ client.m_screenInfo.deviceScaleFactor = 1.325;
int viewportWidth = 800;
int viewportHeight = 1057;