Changeset 199769 in webkit


Ignore:
Timestamp:
Apr 20, 2016 1:47:45 AM (8 years ago)
Author:
Carlos Garcia Campos
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r199764 r199769  
     12016-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [Cairo] Crash in GraphicsContext::drawFocusRing when painting is disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=156785
     5
     6        Reviewed by Žan Doberšek.
     7
     8        This happens for example when view state changes to focus and paint is called from
     9        FrameView::updateControlTints() with a graphics context that doesn't have a platform context. Layout test
     10        fast/images/image-map-outline-with-scale-transform.html sometimes crashes because of this.
     11
     12        * platform/graphics/cairo/GraphicsContextCairo.cpp:
     13        (WebCore::GraphicsContext::drawFocusRing): Return early if painting is disabled.
     14
    1152016-04-19  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r199727 r199769  
    592592void GraphicsContext::drawFocusRing(const Path& path, float width, float /* offset */, const Color& color)
    593593{
     594    if (paintingDisabled())
     595        return;
     596
    594597    // FIXME: We should draw paths that describe a rectangle with rounded corners
    595598    // so as to be consistent with how we draw rectangular focus rings.
Note: See TracChangeset for help on using the changeset viewer.