⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 140444 in webkit


Ignore:
Timestamp:
Jan 22, 2013, 11:24:50 AM (14 years ago)
Author:
senorblanco@chromium.org
Message:

Merge 140057

imageSmoothingEnabled frequent, unpredictable crashes
https://bugs.webkit.org/show_bug.cgi?id=107161

Patch by Alexis Hetu <sugoi@chromium.org> on 2013-01-17
Reviewed by Stephen White.

Source/WebCore:

Added a NULL pointer check to fix a crash.

Test: fast/canvas/canvas-imageSmoothingEnabled-zero-size.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled):

LayoutTests:

Added a layout test for setting image smoothing enabled on a 0 sized
canvas.

  • fast/canvas/canvas-imageSmoothingEnabled-zero-size-expected.txt: Added.
  • fast/canvas/canvas-imageSmoothingEnabled-zero-size.html: Added.

TBR=commit-queue@webkit.org
Review URL: https://codereview.chromium.org/12039021

Location:
branches/chromium/1364
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/chromium/1364/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r139059 r140444  
    24032403    realizeSaves();
    24042404    modifiableState().m_imageSmoothingEnabled = enabled;
    2405     drawingContext()->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone);
     2405    GraphicsContext* c = drawingContext();
     2406    if (c)
     2407        c->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone);
    24062408}
    24072409
Note: See TracChangeset for help on using the changeset viewer.