Bug 59479 - Canvas.StrokeText doesn't draw after setting canvas dimensions
Summary: Canvas.StrokeText doesn't draw after setting canvas dimensions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 11:58 PDT by mikehenning
Modified: 2012-07-01 11:15 PDT (History)
2 users (show)

See Also:


Attachments
Html file that exhibits bug (579 bytes, text/html)
2011-04-26 11:58 PDT, mikehenning
no flags Details
File that exhibits bug (Fixed Typo) (580 bytes, text/html)
2011-04-26 12:02 PDT, mikehenning
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikehenning 2011-04-26 11:58:55 PDT
Created attachment 91137 [details]
Html file that exhibits bug

Overview: Canvas.Stroketext doesn't draw anything after you dynamically set the canvas' dimensions.
Steps to reproduce: Open the attached html file
Expected result: Shows the outline of the word "Text"
Actual result: Shows a blank page
Tested under: Linux GTK+ SVN 84867
It doesn't occur on Safari 5.0.5 or SVN r84630 under Windows XP (The text is drawn successfully)

In the example file, if you comment out the Javascript that sets the width and height of the canvas object, the text draws fine.
Also, if you move the Javascript that sets the width and height to before the context initialization, the text draws fine.
If you initialize the context, then change the dimensions of the canvas, and then  initialize the context of the canvas again, the text fails to be drawn.

This bug doesn't appear to affect any other canvas operations (Tested: StrokeRect, FillText).
Comment 1 mikehenning 2011-04-26 12:02:17 PDT
Created attachment 91140 [details]
File that exhibits bug (Fixed Typo)

There was a typo in the previous example.
Comment 2 mikehenning 2012-07-01 11:15:12 PDT
I tried this again on a recent version of Webkit, and I can't reproduce this any more, so I'm closing this as FIXED.