Closed Bug 386391 Opened 17 years ago Closed 17 years ago

Old padding remains when updating bottom-positioned-div (gmail macros label selector)

Categories

(Core :: Web Painting, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: Mardak, Assigned: sharparrow1)

References

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

Attached file minimized testcase
When dynamically changing the contents of a div that is "position: fixed/absolute" and based on "bottom:", the old padding covers the new content.

Attached is a minimal testcase based on the gmail macros greasemonkey script for choosing a label. (Pressing "g" to open the label selector and typing a label results in a parts of the text cut off - both while typing and when the full label is inserted.)
The padding covers up images as well (use <img src> in the testcase) -> component view rendering

More people (using greasemonkey + gmail macros) might be running into this bug as the beta approaches -> summary update, b1.9?
Assignee: nobody → roc
Component: Layout: Fonts and Text → Layout: View Rendering
Flags: blocking1.9?
QA Contact: layout.fonts-and-text → ian
Summary: Old padding covers new text when updating a div removed from flow and positioned from bottom → Old padding remains when updating bottom-positioned-div (gmail macros label selector)
The screenshot comes from typing "s" then "e" at which point the script will choose "Sent Mail", but the old padding was for displaying only "se".

For gmail macros users that want to avoid the problem, you can edit the script to position by top instead of bottom:

@@ -490,7 +490,7 @@ function getNodeSet() {
   with (boxNode.style) {
     display = "none";
     position = "fixed";
-    bottom = "20%";
+    top = "70%";
     left = "10%";
     margin = "0 10% 0 10%";
     width = "60%";
This is marked with the "regression" keyword.  When did it regress?
Flags: blocking1.9? → blocking1.9+
(In reply to comment #4)
> When did it regress?
Started showing up in 20070227 builds with bug 371536 being a likely candidate.

Fixing this might also fix bug 386395 which has a similar issue but with borders.
Blocks: 371536
Attached patch Patch (obsolete) — Splinter Review
Ugh, I really hate our invalidation model... I don't think we want to continue trying to smash the bugs in this for 1.9.
Assignee: roc → sharparrow1
Status: NEW → ASSIGNED
Attachment #272254 - Flags: review?(roc)
Why does  nsAbsoluteContainingBlock::ReflowAbsoluteFrame need the aChildBounds parameter? the child's overflow area and rect are set correctly when ReflowAbsoluteFrame returns, so we can get them from the frame, right? Is this just simplifying the code to avoid AddFrameToChildBounds being needed?

-  } else if (oldRect.Size() != rect.Size()) {

Why are you eliminating this optimization? Is it unsafe?
Comment on attachment 272254 [details] [diff] [review]
Patch

Oops, I just realized my fix doesn't really even fix the problem :(  Real fix coming up.
Attachment #272254 - Attachment is obsolete: true
Attachment #272254 - Flags: review?(roc)
(In reply to comment #7)
> Why does  nsAbsoluteContainingBlock::ReflowAbsoluteFrame need the aChildBounds
> parameter? the child's overflow area and rect are set correctly when
> ReflowAbsoluteFrame returns, so we can get them from the frame, right? Is this
> just simplifying the code to avoid AddFrameToChildBounds being needed?

It's a simplification, plus it avoids a call to GetOverflowRect() when we can get it off the reflow metrics. (The code currently looks up the overflow property for every frame.)
Attached file Supplemental test
Test with a fixed width div, so the width, height, and overflow rect stay the same.
Attached patch Fixed patchSplinter Review
Blech, I'm not sure how this code managed to stick around so long.  It's been unnecessary for about seven years now...
Attachment #272452 - Flags: review?(roc)
Checked in.  (We don't have any automated invalidation tests at the moment.)
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Blocks: 386395
v. w/ minimized testcase. Thanks!
Status: RESOLVED → VERIFIED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: