Changeset 103439 in webkit


Ignore:
Timestamp:
Dec 21, 2011 1:40:37 PM (12 years ago)
Author:
senorblanco@chromium.org
Message:

Source/WebCore: Fix CSS filters crash on zero-sized elements.
https://bugs.webkit.org/show_bug.cgi?id=75020

Reviewed by Dean Jackson.

Test: css3/filters/filter-empty-element-crash.html

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::inputContext):
Protect against null ImageBuffer.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayer):
Protect against null GraphicsContext.

LayoutTests: Test for CSS filters crash on zero-sized element
https://bugs.webkit.org/show_bug.cgi?id=75020

Reviewed by Dean Jackson.

  • css3/filters/filter-empty-element-crash-expected.txt: Added.
  • css3/filters/filter-empty-element-crash.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r103429 r103439  
     12011-12-21  Stephen White  <senorblanco@chromium.org>
     2
     3        Test for CSS filters crash on zero-sized element
     4        https://bugs.webkit.org/show_bug.cgi?id=75020
     5
     6        Reviewed by Dean Jackson.
     7
     8        * css3/filters/filter-empty-element-crash-expected.txt: Added.
     9        * css3/filters/filter-empty-element-crash.html: Added.
     10
    1112011-12-20  Dmitry Lomov  <dslomov@google.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r103435 r103439  
     12011-12-21  Stephen White  <senorblanco@chromium.org>
     2
     3        Fix CSS filters crash on zero-sized elements.
     4        https://bugs.webkit.org/show_bug.cgi?id=75020
     5
     6        Reviewed by Dean Jackson.
     7
     8        Test: css3/filters/filter-empty-element-crash.html
     9
     10        * rendering/FilterEffectRenderer.cpp:
     11        (WebCore::FilterEffectRenderer::inputContext):
     12        Protect against null ImageBuffer.
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::paintLayer):
     15        Protect against null GraphicsContext.
     16
    1172011-12-21  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp

    r103170 r103439  
    8989GraphicsContext* FilterEffectRenderer::inputContext()
    9090{
    91     return sourceImage()->context();
     91    return sourceImage() ? sourceImage()->context() : 0;
    9292}
    9393
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r103297 r103439  
    27552755        // Paint into the context that represents the SourceGraphic of the filter.
    27562756        GraphicsContext* sourceGraphicsContext = m_filter->inputContext();
     2757        if (!sourceGraphicsContext)
     2758            return;
    27572759       
    27582760        LayoutPoint layerOrigin;
Note: See TracChangeset for help on using the changeset viewer.