Closed
Bug 296763
Opened 20 years ago
Closed 18 years ago
2d rendering context: beginPath() should call moveTo(0,0)
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
People
(Reporter: ted, Unassigned)
References
()
Details
The WHAT-WG spec says beginPath() calls moveTo(0,0).
Hrrrm. I'll have to check what Safari does; this sounds like an error in the spec.
Comment 2•20 years ago
|
||
So beginPath() would continue from where the last one left off? Would that be part of the save/restore state? I think this assertion came from the Apple docs originally, let me know if it needs to change.
Comment 3•20 years ago
|
||
Wait, are the specs being molded to suite what Safari already has? I always thought the specs were supposed to be the ones followed, and if another browser disobeys them, we shouldn't emulate them.
Comment 4•20 years ago
|
||
The specification is partly based on Safari's implementation as they implemented it before there was a specification for the element.
Comment 5•20 years ago
|
||
Which begs the question why we are implementing an unfinished spec that has obvious conflicts with the implementation it's based on. I remember several cases in the past where mozilla decided not to implement a spec because it was incomplete or wasn't a standard yet. Changing the rules mid-spec also makes a mess for other applications wishing to be ahead of the game and implement early. I know, that's out of the scope of this bug, but it's issues that should be addressed.
Comment 6•20 years ago
|
||
It's like this: * Safari invented and shipped <canvas>. * Firefox 1.1 will be shipping with a compatible <canvas>. * Opera will be shipping a compatible <canvas> in due course too. The spec is to allow vendors to agree on who is "correct" once two of them have shipped, and to allow other vendors to implement the same thing without having to reverse engineer other browsers. While there is only one implementation (as with <canvas> at the moment), that implementation is king, since we all want to be compatible. There's no point having a spec that doesn't match reality. Similarly, the parts of the spec that only WinIE6 implements will be made compatible with WinIE6.
Reporter | ||
Comment 7•19 years ago
|
||
*** Bug 323999 has been marked as a duplicate of this bug. ***
Fixed by 333177.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 9•18 years ago
|
||
Nice but it has broken many people's work out there. Did it worth it? I would understand adding new features but breaking it to emulate safari to 100% doesnt feel right. Instead of breaking it, advising people to call moveTo(0,0) after beginPath() would have been more appropriate.
Comment 10•18 years ago
|
||
Drawing a perfect circle with a linewidth more than 2 is almost impossible with this change. I cant interpolate the moveTo location, there is always a deformation somewhere. Is there an example to draw a perfect circle with linewidth 3 and radius 5 using this new change? It works with linewidth 1 there is no doubt about it. If you ask me if the path begins with an arc it shouldnt moveTo(0,0), and who knows if safari doesnt do just that under the hood ;).
You know, based on what Safari does, this is bogus; there should be no implied moveTo(0,0). I thought I had tested this in Safari first, but I guess not. As this -does- break web content, I'm going to revert this change.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Er, opening bug 346005 for the revert instead.
Status: REOPENED → RESOLVED
Closed: 19 years ago → 18 years ago
Resolution: --- → FIXED
Comment 13•18 years ago
|
||
FWIW, Ian has changed the spec. to follow Safari's implementation so there's no longer an implicit moveTo(0,0).
Comment 14•18 years ago
|
||
*** Bug 323222 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•