Canvas fills when it should stroke

RESOLVED FIXED

Status

()

Core
Canvas: 2D
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Andrew Miller, Assigned: vlad)

Tracking

({fixed1.8.1, testcase})

Trunk
x86
Linux
fixed1.8.1, testcase
Points:
---
Bug Flags:
blocking1.8.1 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Build Identifier: Trunk (problem appeared sometime in the last week)

Try my testcase.

Reproducible: Always

Steps to Reproduce:
Try my testcase.
Actual Results:  
Get a shaded "triangle".

Expected Results:  
Should only see lines.
(Reporter)

Comment 1

11 years ago
Created attachment 231708 [details]
Testcase: Canvas fills when it should stroke.
I can confirm this on trunk.  Works just fine in 1.5.0.5.
Flags: blocking1.9a2?

Comment 3

11 years ago
I'd guess that's caused by the patch in bug 346421 (now in the 1.8 branch), which adds into Render a zero-sized rectangle and a fill but doesn't do the equivalent of beginPath - so if a path is open at the time Render is called, that path will be filled. And I guess Render can't simply call the equivalent of beginPath because it can't be sure nobody's going to come back to the canvas later and expect it to still have the path they last set up. (Or I could be guessing wrong; but at least it sounds plausible.)

Comment 4

11 years ago
Works in Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b1) Gecko/20060731 BonEcho/2.0b1
Fails in Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b1) Gecko/20060801 BonEcho/2.0b1

Half of the examples at http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes fail too.
Flags: blocking1.8.1?

Updated

11 years ago
Keywords: testcase
Flags: blocking1.8.1? → blocking1.8.1+
(In reply to comment #3)
> I'd guess that's caused by the patch in bug 346421 (now in the 1.8 branch),
> which adds into Render a zero-sized rectangle and a fill but doesn't do the
> equivalent of beginPath - so if a path is open at the time Render is called,
> that path will be filled. And I guess Render can't simply call the equivalent
> of beginPath because it can't be sure nobody's going to come back to the canvas
> later and expect it to still have the path they last set up. (Or I could be
> guessing wrong; but at least it sounds plausible.)

That's what I said on IRC last night; though it's got nothing to do with Render in particular.  I have a fix, but I like it even less than the fix for 346421.  Going to investigate more today.

Assignee: nobody → vladimir
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 346421
This should be fixed; please reopen if it's not?  (Testcase works for me in bonecho 20060814.)
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Flags: blocking1.9a2?
You need to log in before you can comment on or make changes to this bug.