Closed Bug 757477 Opened 12 years ago Closed 12 years ago

[Responsive Mode] restore previous size / preset

Categories

(DevTools :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 15

People

(Reporter: paul, Unassigned)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 3 obsolete files)

We should restore the latest size and preset.
Attached patch patch v1 (obsolete) (deleted) — Splinter Review
Attachment #626043 - Flags: review?(dcamp)
Blocks: 749628
Blocks: 752857
No longer blocks: 749628
Attached patch patch v1 (obsolete) (deleted) — Splinter Review
rebased
Attachment #626043 - Attachment is obsolete: true
Attachment #626043 - Flags: review?(dcamp)
Attachment #627753 - Flags: review?(dcamp)
Comment on attachment 627753 [details] [diff] [review] patch v1 Review of attachment 627753 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/responsivedesign/responsivedesign.jsm @@ +76,5 @@ > this.presets = [{custom: true}]; > } > > // Default size. The first preset (custom) is the one that will be used. > let bbox = this.stack.getBoundingClientRect(); Do you need this bbox @@ +81,5 @@ > + > + try { > + this.presets[0].width = Services.prefs.getIntPref("devtools.responsiveUI.customWidth"); > + this.presets[0].height = Services.prefs.getIntPref("devtools.responsiveUI.customHeight"); > + this.currentPreset = Services.prefs.getIntPref("devtools.responsiveUI.currentPreset"); Should there be a sanity check on these values? Can a really-large custom size cause any real problems? Should the preset be some sort of absolute string rather than an integer index? That could make later updates to the preset list less fragile. @@ +306,5 @@ > */ > rotate: function RUI_rotate() { > this.setSize(this.currentHeight, this.currentWidth); > + if (this.currentPreset == 0) > + this.saveCustomSize(); Do you save the rotation value anywhere?
Attachment #627753 - Flags: review?(dcamp)
(In reply to Dave Camp (:dcamp) from comment #3) > Comment on attachment 627753 [details] [diff] [review] > patch v1 > > Review of attachment 627753 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: browser/devtools/responsivedesign/responsivedesign.jsm > @@ +76,5 @@ > > this.presets = [{custom: true}]; > > } > > > > // Default size. The first preset (custom) is the one that will be used. > > let bbox = this.stack.getBoundingClientRect(); > > Do you need this bbox ... outside of the catch block?
No longer blocks: 752857
Attached patch v1.1 (obsolete) (deleted) — Splinter Review
addressed dave's comments
Attachment #627753 - Attachment is obsolete: true
Attachment #629500 - Flags: review?(dcamp)
Attachment #629500 - Flags: review?(dcamp) → review+
Attached patch un-bitrotted (deleted) — Splinter Review
I had bitrotted you pretty badly, so I fixed it.
Attachment #629500 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: