Title: [203317] trunk/Source/WebCore
Revision
203317
Author
[email protected]
Date
2016-07-15 18:43:53 -0700 (Fri, 15 Jul 2016)

Log Message

Repaints rects drawn incorrectly when inspecting a WebView on a Retina display
https://bugs.webkit.org/show_bug.cgi?id=159824
rdar://problem/27376305

Reviewed by Brian Burg.

InspectorOverlayPage.js set up the canvases with a deviceScaleFactor passed into
reset(), which comes from the overlay's m_page.deviceScaleFactor(). However, updatePaintRects()
used window.devicePixelRatio which was always 1.

Fix by setting the deviceScaleFactor on the m_overlayPage.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203316 => 203317)


--- trunk/Source/WebCore/ChangeLog	2016-07-16 01:19:21 UTC (rev 203316)
+++ trunk/Source/WebCore/ChangeLog	2016-07-16 01:43:53 UTC (rev 203317)
@@ -1,3 +1,20 @@
+2016-07-15  Simon Fraser  <[email protected]>
+
+        Repaints rects drawn incorrectly when inspecting a WebView on a Retina display
+        https://bugs.webkit.org/show_bug.cgi?id=159824
+        rdar://problem/27376305
+
+        Reviewed by Brian Burg.
+
+        InspectorOverlayPage.js set up the canvases with a deviceScaleFactor passed into
+        reset(), which comes from the overlay's m_page.deviceScaleFactor(). However, updatePaintRects()
+        used window.devicePixelRatio which was always 1.
+
+        Fix by setting the deviceScaleFactor on the m_overlayPage.
+
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::overlayPage):
+
 2016-07-15  Myles C. Maxfield  <[email protected]>
 
         [macOS] Work around crash in [NSAttributedString nextWordFromIndex:forward:]

Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (203316 => 203317)


--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2016-07-16 01:19:21 UTC (rev 203316)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2016-07-16 01:43:53 UTC (rev 203317)
@@ -867,6 +867,7 @@
     PageConfiguration pageConfiguration(makeUniqueRef<EmptyEditorClient>(), SocketProvider::create());
     fillWithEmptyClients(pageConfiguration);
     m_overlayPage = std::make_unique<Page>(WTFMove(pageConfiguration));
+    m_overlayPage->setDeviceScaleFactor(m_page.deviceScaleFactor());
 
     Settings& settings = m_page.settings();
     Settings& overlaySettings = m_overlayPage->settings();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to