Open Bug 1601811 Opened 5 years ago Updated 2 years ago

Replace writing window.inner{Width,Height} with something others

Categories

(MailNews Core :: Account Manager, task)

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

I was going to make window.inner{Width,Hegith} compliant with the spec in bug 1595962, but some comm-central codes do write the property directly and expect that it changes window size too.

Instead changing the property we can use window.resizeBy() or resizeTo().

Assignee: nobody → hikezoe.birchill
See Also: → 1590503
See Also: → 1601812
Blocks: 1595962
Attachment #9113997 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9113997 [details] [diff] [review] Use window.resizeBy() instead of changing window.inner{Width,Height} Thanks for fixing this for us beforehand. Did you merge it into one winwo.resizeby() call so that the window only resizes once to the final dimensions, not in 2 steps?
Attachment #9113997 - Flags: review?(ben.bucksch)

At least on trunk the "secure warning" is apparently broken :(

So the patch as such can't be tested. https://searchfox.org/comm-central/rev/bc17d0ef9860233e9ef72dc9324221ba86d662ae/mail/components/accountcreation/content/emailWizard.js#2258 needs to be gEmailConfigWizard.resizeDialog()

Bug 1604409 fixed the brokenness from comment 3.

Status: NEW → ASSIGNED

Updated to trunk.
I'm not sure it works, the whole function I mean. For manual resize it never gets out of the too small resized state. Didn't try with l10n yet.

Attachment #9113997 - Attachment is obsolete: true
Attachment #9113997 - Flags: review?(mkmelin+mozilla)
Attachment #9113997 - Flags: review?(ben.bucksch)

What do you mean with "manual resize"?

What actual bug is motivating the code changes here?
And since when does that bug exist?

[Removed comment about Bug 1604409]

That if I manually resize the dialog to something uncomfortable, later when onResize is called it doesn't get big enough to show everything without scrollbars.
Just trying to understand https://searchfox.org/comm-central/rev/7d24f30cebfef878d2bf89dfd2305753d8e7d481/mail/components/accountcreation/content/emailWizard.js#156-157

To be clear, content is still accessible since there are the scrollbars. Just not comfy.

What actual bug is motivating the code changes here?

Bug 1595962

I see.

manually resize the dialog to something uncomfortable

I presume you mean something smaller than necessary for the window contents.

FWIW, the manual resize case is not really important. It's much more important to get the size correct automatically. If the user manually resizes, and thjen later the window content changes, and we're automatically resizing smaller again, I would not mind that.

Could you please try to use resizeTo() instead of resizeBy()? Even if it doesn't fix the bug you're seeing, it still better matches the intent of the code.

I think it does make sense to make the window smaller as well. Esp. after leaving the a warning box.

Maybe, but it's not that window.resizeBy doesn't "work". It's that we don't seem to get to the case where we (would) call it.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: