Resized windows are 1 pixel wider/taller than you want

VERIFIED DUPLICATE of bug 86740

Status

()

Core
XUL
--
minor
VERIFIED DUPLICATE of bug 86740
17 years ago
16 years ago

People

(Reporter: Matthew Paul Thomas, Assigned: Peter Trudelle)

Tracking

({pp})

Trunk
PowerPC
Mac System 9.x
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
Build: 2001073008, Mac OS 9.1

To reproduce:
1.  Open a Navigator, Messenger, Composer, Chatzilla, message composition, or
    whatever window.
2.  Mouse down on the grow box (resize handle), and *do not move the mouse*.
3.  Mouse up.

What should happen:
*   Nothing.

What happens:
*   The window gets 1 pixel wider and 1 pixel taller.
*   The corollary of this is that whenever you *do* resize a window, it is 1
    pixel wider and 1 pixel taller than you want it to be.

Comment 1

17 years ago
I'm not seeing this on 2001072808 Win2k. Adding pp keyword.
Keywords: pp

Comment 2

17 years ago
this is a dup.

Comment 3

17 years ago
Gee, that was easier to find than I thought it would be. -> 86740

*** This bug has been marked as a duplicate of 86740 ***
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE

Comment 4

17 years ago
verified dup
Status: RESOLVED → VERIFIED

Comment 5

16 years ago
From #50998

------- Additional Comment #20 From rbs@maths.uq.edu.au  2002-09-17 02:26 -------

There is a remaining cleanup of #if defined(_WIN32) || defined(XP_OS2) in 
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp

While there, also saw a code that computes 'NSToCoordRound(p2t)' too many times
(caming from the patch in bug 99948):

    // round to a multiple of p2t
    nscoord rest = internalPadding%NSToCoordRound(p2t);
    if( rest < NSToCoordRound(p2t) - rest) {
      internalPadding = internalPadding - rest;
    } else {
      internalPadding = internalPadding + NSToCoordRound(p2t) - rest;
    }

While you are there, mind cleaning up that code a little bit, e.g., use:
    nscoord t = NSToCoordRound(p2t);
    nscoord rest = internalPadding % t;
    if( rest < t - rest) { // same as rest < half-of-pixel
      internalPadding -= rest; // round down
    } else {
      internalPadding += t - rest; // round up
    }

You need to log in before you can comment on or make changes to this bug.