Closed Bug 85883 Opened 24 years ago Closed 24 years ago

Changing backgroundColor of BODY from JavaScript does wrong.

Categories

(Core Graveyard :: GFX, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: golam, Assigned: attinasi)

References

()

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.1+) Gecko/20010613 BuildID: 2001061304 After changing background color style of body element background color should be changed on entire page. But it is not. (see testcase) Reproducible: Always Steps to Reproduce: 1. Open testcase. 2. Press button. 3. Reflow window content. (minimize and then maximize window or resize window) Actual Results: Background color should be changed everythere. Expected Results: Background color is changed only in form element.
The problem here is that the page is not refreshed (no reflow?). If you minimise Mozilla (or put a window in front of Mozilla) when you restore Mozilla to the front, the background colour changes.
Confirmed 2001060712. Is it as simple as making sure the page reflows after altering the body style, or is it something to do with mozilla only making the body as big as it has to be rather than as big as the viewport (window)?
The problem is that we apply the fixup rule correctly, but only repaint the <body>, not the <html> element. Over to compositor. Seeing this on Linux build 2001-06-13-08 as well.
Assignee: jst → kmcclusk
Status: UNCONFIRMED → NEW
Component: DOM Style → Compositor
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: ian → petersen
Marc: I think you worked on a similar problem in the past. (i.e applying the body color to the viewport frame?) Changing the style for the body element needs to invalidate the entire window (viewport frame dimensions) not just the body's frame. Dragging a window over the top of the window displays the correct body color, so the view seems to have the correct size. Marc I'm reassigning to you for now.
Assignee: kmcclusk → attinasi
I've fixed this a couple of times now... I'll check it again.
Status: NEW → ASSIGNED
I suggest this bug to be fixed before 1.0 is out. Reasons: 1. This is standart compliance bug. 2. This is ugly. 2. I think this is "easy to fix" bug.
Keywords: mozilla1.0
There's a slight perf hit there in an edge case, since we will also invalidate on font color changes. But other than that I can't think of any style changes to body that would cause a restyle but not reflow and would not require invalidation of the canvas..... Marc, what do you think?
Keywords: patch, review
It's a sledgehammer - you can change things on the body that should not invalidate the entire canvas - setting properties that will not have any impact at all, or setting properties that are only then inherited to contained elements. But, the handling of the background color is already a sledgehammer, and this is perfectly appropriate, and in good company ;) I would have done the same change, for better or worse. sr=attinasi, and thanks!
Attachment #54232 - Flags: superreview+
Attachment #54232 - Flags: review+
checked in on the trunk. Thansk for the quick reviews!
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: