Title: [120966] trunk/Source
Revision
120966
Author
[email protected]
Date
2012-06-21 15:02:32 -0700 (Thu, 21 Jun 2012)

Log Message

[chromium] Overlays when using the web inspector are blurry with device scale factor > 1
https://bugs.webkit.org/show_bug.cgi?id=89676

Patch by Ian Vollick <[email protected]> on 2012-06-21
Reviewed by James Robinson.

Whenever we construct a GraphicsLayerChromium, make initialize the
device and page scale factors, if possible.

Source/WebCore:

Unit test: GraphicsLayerChromiumTest.shouldStartWithCorrectContentsScale

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::GraphicsLayerChromium):

Source/WebKit/chromium:

* tests/GraphicsLayerChromiumTest.cpp:
(WebKitTests::TEST_F):
(WebKitTests):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120965 => 120966)


--- trunk/Source/WebCore/ChangeLog	2012-06-21 21:48:20 UTC (rev 120965)
+++ trunk/Source/WebCore/ChangeLog	2012-06-21 22:02:32 UTC (rev 120966)
@@ -1,3 +1,18 @@
+2012-06-21  Ian Vollick  <[email protected]>
+
+        [chromium] Overlays when using the web inspector are blurry with device scale factor > 1
+        https://bugs.webkit.org/show_bug.cgi?id=89676
+
+        Reviewed by James Robinson.
+
+        Whenever we construct a GraphicsLayerChromium, make initialize the
+        device and page scale factors, if possible.
+
+        Unit test: GraphicsLayerChromiumTest.shouldStartWithCorrectContentsScale
+
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
+
 2012-06-21  Philippe Normand  <[email protected]>
 
         [Qt] REGRESSION(r120790): broke video rendering

Modified: trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (120965 => 120966)


--- trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-06-21 21:48:20 UTC (rev 120965)
+++ trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-06-21 22:02:32 UTC (rev 120966)
@@ -93,7 +93,8 @@
     m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingContentLayerDelegate(this));
     m_layer = WebContentLayer::create(m_opaqueRectTrackingContentLayerDelegate.get());
     m_layer.setDrawsContent(m_drawsContent && m_contentsVisible);
-
+    if (client)
+        deviceOrPageScaleFactorChanged();
     updateDebugIndicators();
 }
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (120965 => 120966)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-06-21 21:48:20 UTC (rev 120965)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-06-21 22:02:32 UTC (rev 120966)
@@ -1,3 +1,17 @@
+2012-06-21  Ian Vollick  <[email protected]>
+
+        [chromium] Overlays when using the web inspector are blurry with device scale factor > 1
+        https://bugs.webkit.org/show_bug.cgi?id=89676
+
+        Reviewed by James Robinson.
+
+        Whenever we construct a GraphicsLayerChromium, make initialize the
+        device and page scale factors, if possible.
+
+        * tests/GraphicsLayerChromiumTest.cpp:
+        (WebKitTests::TEST_F):
+        (WebKitTests):
+
 2012-06-21  Min Qin  <[email protected]>
 
         remove ENABLE_FULLSCREEN_MEDIA_CONTROL flag

Modified: trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp (120965 => 120966)


--- trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp	2012-06-21 21:48:20 UTC (rev 120965)
+++ trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp	2012-06-21 22:02:32 UTC (rev 120966)
@@ -57,6 +57,7 @@
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) OVERRIDE { }
     virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE { return false; }
     virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE { return false; }
+    virtual float deviceScaleFactor() const OVERRIDE { return 2; }
 };
 
 class MockLayerTreeHostClient : public CCLayerTreeHostClient {
@@ -395,4 +396,9 @@
     expectTranslateX(2, curve->getValue(duration));
 }
 
+TEST_F(GraphicsLayerChromiumTest, shouldStartWithCorrectContentsScale)
+{
+    EXPECT_EQ(2, m_platformLayer->contentsScale());
+}
+
 } // namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to