Changeset 68343 in webkit


Ignore:
Timestamp:
Sep 26, 2010 10:39:34 AM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-09-26 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Dan Bernstein.

Canvas: Crash when setting a font with size in 'ex' units
https://bugs.webkit.org/show_bug.cgi?id=46538

update() the style's font after setting the style's font description.
Needed because CSSPrimitiveValue::computeLengthDouble() later assumes
that the style's font is properly initialized (for xHeight().)

Fixes crash on IE test center's canvas-text-font-002 test.

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont):

2010-09-26 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Dan Bernstein.

Canvas: Crash when setting a font with size in 'ex' units
https://bugs.webkit.org/show_bug.cgi?id=46538

  • fast/canvas/canvas-font-ex-units-crash-expected.txt: Added.
  • fast/canvas/canvas-font-ex-units-crash.html: Added.
  • fast/canvas/script-tests/canvas-font-ex-units-crash.js: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r68341 r68343  
     12010-09-26  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Canvas: Crash when setting a font with size in 'ex' units
     6        https://bugs.webkit.org/show_bug.cgi?id=46538
     7
     8        * fast/canvas/canvas-font-ex-units-crash-expected.txt: Added.
     9        * fast/canvas/canvas-font-ex-units-crash.html: Added.
     10        * fast/canvas/script-tests/canvas-font-ex-units-crash.js: Added.
     11
    1122010-09-26  Robert Hogan  <robert@webkit.org>
    213
  • trunk/WebCore/ChangeLog

    r68342 r68343  
     12010-09-26  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Canvas: Crash when setting a font with size in 'ex' units
     6        https://bugs.webkit.org/show_bug.cgi?id=46538
     7
     8        update() the style's font after setting the style's font description.
     9        Needed because CSSPrimitiveValue::computeLengthDouble() later assumes
     10        that the style's font is properly initialized (for xHeight().)
     11
     12        Fixes crash on IE test center's canvas-text-font-002 test.
     13
     14        * html/canvas/CanvasRenderingContext2D.cpp:
     15        (WebCore::CanvasRenderingContext2D::setFont):
     16
    1172010-09-26  Kwang Yul Seo  <skyul@company100.net>
    218
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r68176 r68343  
    16911691    // relative to the canvas.
    16921692    RefPtr<RenderStyle> newStyle = RenderStyle::create();
    1693     if (RenderStyle* computedStyle = canvas()->computedStyle())
     1693    if (RenderStyle* computedStyle = canvas()->computedStyle()) {
    16941694        newStyle->setFontDescription(computedStyle->fontDescription());
     1695        newStyle->font().update(newStyle->font().fontSelector());
     1696    }
    16951697
    16961698    // Now map the font property into the style.
Note: See TracChangeset for help on using the changeset viewer.