Closed Bug 1035594 Opened 10 years ago Closed 9 years ago

[Camera] Make camera use DOMRect instead of CameraSize

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: aosmond, Unassigned)

References

Details

Attachments

(1 file)

Camera currently uses its own custom dictionary CameraSize instead of the standard DOMRect for data sets requiring a width/height. It should be switched over to use DOMRect.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Attached patch bug1035594.patch, v1 (deleted) — Splinter Review
This actually does have an impact on gaia, in that it caches the old config as a JSON string and converts back on startup in order to save on startup time. Unfortunately that means the object type may be wrong and may require changes from apps unless we do something differently (perhaps create a DOMRectInit dictionary for the config?).
Attachment #8452094 - Flags: review?(mhabicher)
Depends on: camera-events
Comment on attachment 8452094 [details] [diff] [review] bug1035594.patch, v1 Review of attachment 8452094 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, with just a pair of nits and a question. Sorry this took so long. ::: dom/camera/DOMCameraCapabilities.cpp @@ +24,5 @@ > NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow) > + NS_IMPL_CYCLE_COLLECTION_UNLINK(mPreviewSizes) > + NS_IMPL_CYCLE_COLLECTION_UNLINK(mPictureSizes) > + NS_IMPL_CYCLE_COLLECTION_UNLINK(mThumbnailSizes) > + NS_IMPL_CYCLE_COLLECTION_UNLINK(mVideoSizes) Do these need _TRAVERSE entries as well? @@ +101,5 @@ > > aSizes.Clear(); > aSizes.SetCapacity(sizes.Length()); > for (uint32_t i = 0; i < sizes.Length(); ++i) { > + DOMRect *s = new DOMRect(this, 0, 0, sizes[i].width, sizes[i].height); nit: DOMRect* s = ... ::: dom/camera/DOMCameraCapabilities.h @@ +24,5 @@ > class ICameraControl; > class RecorderProfileManager; > > namespace dom { > +class DOMRectReadOnly; nit: a blank line before this one, please.
Attachment #8452094 - Flags: review?(mhabicher) → review+
Assignee: aosmond → nobody
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: