Title: [199769] trunk/Source/WebCore
- Revision
- 199769
- Author
- [email protected]
- Date
- 2016-04-20 01:47:45 -0700 (Wed, 20 Apr 2016)
Log Message
[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: trunk/Source/WebCore/ChangeLog (199768 => 199769)
--- trunk/Source/WebCore/ChangeLog 2016-04-20 08:44:43 UTC (rev 199768)
+++ trunk/Source/WebCore/ChangeLog 2016-04-20 08:47:45 UTC (rev 199769)
@@ -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]>
REGRESSION(r198782): SHOULD NEVER BE REACHED failure in ImageSource::setData since r198782
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (199768 => 199769)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2016-04-20 08:44:43 UTC (rev 199768)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2016-04-20 08:47:45 UTC (rev 199769)
@@ -591,6 +591,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