Title: [200026] releases/WebKitGTK/webkit-2.12/Source/WebCore
Revision
200026
Author
[email protected]
Date
2016-04-25 08:54:34 -0700 (Mon, 25 Apr 2016)

Log Message

Merge r199769 - [Cairo] Crash in GraphicsContext::drawFocusRing when painting is disabled
https://bugs.webkit.org/show_bug.cgi?id=156785

Reviewed by Žan Doberšek.

This happens for example when view state changes to focus and paint is called from
FrameView::updateControlTints() with a graphics context that doesn't have a platform context. Layout test
fast/images/image-map-outline-with-scale-transform.html sometimes crashes because of this.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawFocusRing): Return early if painting is disabled.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (200025 => 200026)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-25 15:53:24 UTC (rev 200025)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-25 15:54:34 UTC (rev 200026)
@@ -1,3 +1,17 @@
+2016-04-20  Carlos Garcia Campos  <[email protected]>
+
+        [Cairo] Crash in GraphicsContext::drawFocusRing when painting is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=156785
+
+        Reviewed by Žan Doberšek.
+
+        This happens for example when view state changes to focus and paint is called from
+        FrameView::updateControlTints() with a graphics context that doesn't have a platform context. Layout test
+        fast/images/image-map-outline-with-scale-transform.html sometimes crashes because of this.
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::drawFocusRing): Return early if painting is disabled.
+
 2016-04-19  Carlos Garcia Campos  <[email protected]>
 
         [Cairo] GraphicsContext::drawFocusRing methods are not consistent to each other

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (200025 => 200026)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-04-25 15:53:24 UTC (rev 200025)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-04-25 15:54:34 UTC (rev 200026)
@@ -593,6 +593,9 @@
 
 void GraphicsContext::drawFocusRing(const Path& path, float width, float /* offset */, const Color& color)
 {
+    if (paintingDisabled())
+        return;
+
     // FIXME: We should draw paths that describe a rectangle with rounded corners
     // so as to be consistent with how we draw rectangular focus rings.
     Color ringColor = color;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to