Closed
Bug 768067
Opened 13 years ago
Closed 12 years ago
Implement canvasRenderingContext2D.get/setLineDash
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla27
Tracking | Status | |
---|---|---|
relnote-firefox | --- | 27+ |
People
(Reporter: peterv, Assigned: cabanier)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete, html5, Whiteboard: [parity with Safari, Chrome and IE])
Attachments
(2 files, 5 obsolete files)
8.54 KB,
patch
|
Details | Diff | Splinter Review | |
2.13 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #813352 -
Attachment is obsolete: true
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #813353 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #813354 -
Flags: review?(roc)
Assignee | ||
Comment 4•12 years ago
|
||
Not sure about removing the moz methods. That would break current sites...
Assignee | ||
Comment 5•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → cabanier
Keywords: dev-doc-needed,
html5
Whiteboard: [parity with Safari, Chrome and IE]
Assignee | ||
Updated•12 years ago
|
Attachment #813354 -
Flags: review?(roc) → review?(bas)
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #815180 -
Flags: review?(bas)
Assignee | ||
Updated•12 years ago
|
Attachment #813354 -
Attachment is obsolete: true
Attachment #813354 -
Flags: review?(bas)
Comment 7•12 years ago
|
||
This Bug 768067, Bug 740284, Bug 683051 and Bug 809586 seem to overlap at least in part. Can somebody with the necessary knowledge (and privs) please clean up/merge and clarify the individual bugs & summaries?
Comment on attachment 815180 [details] [diff] [review]
Add support for set/getLineDash and dash offset
Review of attachment 815180 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/canvas/src/CanvasRenderingContext2D.cpp
@@ +2856,5 @@
> +CanvasRenderingContext2D::SetLineDash(const mozilla::dom::AutoSequence<double>& mSegments) {
> + FallibleTArray<mozilla::gfx::Float>& dash = CurrentState().dash;
> + dash.Clear();
> +
> + for(mozilla::dom::AutoSequence<double>::index_type x = 0; x < mSegments.Length(); x++) {
uint32_t type for 'x'.
@@ +2859,5 @@
> +
> + for(mozilla::dom::AutoSequence<double>::index_type x = 0; x < mSegments.Length(); x++) {
> + dash.AppendElement(mSegments[x]);
> + }
> + if(mSegments.Length()%2) { // If the number of elements is odd, concatenate again
Sapace after 'if' and 'for'.
@@ +2867,5 @@
> + }
> +}
> +
> +void
> +CanvasRenderingContext2D::GetLineDash(nsTArray<double>& mSegments) const {
This parameter should be called aSegments
@@ +2871,5 @@
> +CanvasRenderingContext2D::GetLineDash(nsTArray<double>& mSegments) const {
> + const FallibleTArray<mozilla::gfx::Float>& dash = CurrentState().dash;
> + mSegments.Clear();
> +
> + for(FallibleTArray<mozilla::gfx::Float>::index_type x = 0; x < dash.Length(); x++) {
Space after 'for'.
Also, you can make x 'uint32_t'. Easier to read.
Attachment #815180 -
Flags: review?(bas) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #815180 -
Attachment is obsolete: true
Assignee | ||
Comment 10•12 years ago
|
||
Updated patch per roc's comments.
Try server: https://tbpl.mozilla.org/?tree=Try&rev=e6dd13184378
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 11•12 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 12•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•12 years ago
|
relnote-firefox:
--- → ?
Comment 14•12 years ago
|
||
(In reply to Rik Cabanier from comment #10)
> Updated patch per roc's comments.
The comments were not addressed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 15•12 years ago
|
||
(In reply to :Ms2ger from comment #14)
> (In reply to Rik Cabanier from comment #10)
> > Updated patch per roc's comments.
>
> The comments were not addressed.
I must have copied the wrong patch :-(
Will fix this asap
Assignee | ||
Comment 16•12 years ago
|
||
Attachment #823033 -
Flags: review?(Ms2ger)
Assignee | ||
Comment 17•12 years ago
|
||
Attachment #823033 -
Attachment is obsolete: true
Attachment #823033 -
Flags: review?(Ms2ger)
Attachment #823037 -
Flags: review?(Ms2ger)
Comment 18•12 years ago
|
||
Comment on attachment 823037 [details] [diff] [review]
Fix incorrect style
Review of attachment 823037 [details] [diff] [review]:
-----------------------------------------------------------------
This is r=roc in comment 8.
Attachment #823037 -
Flags: review?(Ms2ger)
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Updated•12 years ago
|
Summary: Implement canvasRenderingContext2D.get/setLineDash and deprecate/remove mozDash → Implement canvasRenderingContext2D.get/setLineDash
Comment 19•12 years ago
|
||
Keywords: checkin-needed
Comment 20•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Comment 21•11 years ago
|
||
Reference:
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.getLineDash
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setLineDash
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineDashOffset
Release notes:
https://developer.mozilla.org/en-US/Firefox/Releases/27#Interfaces.2FAPIs.2FDOM
Keywords: dev-doc-needed → dev-doc-complete
Updated•3 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•