Closed Bug 12126 Opened 25 years ago Closed 25 years ago

Removing "bgcolor" attribute from BODY tag doesn't trigger repaint

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 1886

People

(Reporter: kinmoz, Assigned: troy)

References

Details

Attachments

(1 file)

nsHTMLEditor::SetBackgroundColor() does not use a transaction to set the bgcolor
attribute on the body. It needs to if we want to be able to undo this action.

I believe all that needs to be done is to call SetBodyAttribute()?
Assignee: sfraser → cmanske
charlie implemented this, so I'll let him handle it.
*** Bug 11773 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: M10
Charlie, I think what we need to do here is get rid of SetBackgroundColor() from
all our interfaces and just have the JavaScript call SetBodyAttribute().

SetBodyAttribute() goes through the transaction system I believe.
But this method sets (i.e, will set) table backgrounds when that is
appropriate. Although I guess the logic to check if you are in a table could
also be done in JS. I just need to use nsHTMLEditor::SetAttribute instead.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Checked in 8/25
Whiteboard: waiting for hyatt's XPFE menu fix in order to verify this one
Status: RESOLVED → REOPENED
not fixed...both Kin and I saw that undoing a bg change didn't work...
forgot to add that it was the 9/2 build that we noticed it wasn't fixed..
Status: REOPENED → ASSIGNED
Target Milestone: M10 → M11
Resolution: FIXED → ---
Well I'm using the nsEditor::SetAttribute() method that goes through the
transaction system and it worked after I first tested it, but it doesn't seem
to undo now. Must be another problem.
I updated my tree as of 9/2/99 mid afternoon and it works fine.
I used File|New from the browser to create a new editor document, typed in it,
and tested both File|Close and File|Quit and in both cases it brought up a
dialog asking you to save. It also worked from the default editor page, after
typing in it.
Charley, I tried undo'ing after changing the bg color...still not working
using 9/17 builds...you wanted me to check this out....
Assignee: cmanske → troy
Status: ASSIGNED → NEW
Component: Editor → Layout
Summary: Make nsHTMLEditor::SetBackgroundColor() an undoable action. → Removing "bgcolor" attribute from BODY tag doesn't trigger repaint
Whiteboard: waiting for hyatt's XPFE menu fix in order to verify this one
This one has been mysterious!
The problem is this:
When setting the color, the current value of "bgcolor" is saved, as well as
a bool that the attribute is set. This is used to undo the action.
The problem is this: When using the Set Background color the first time,
then undoing, the undo action correctly removes the "bgcolor" attribute, but
the document isn't repainted.
You can use the test file to confirm this:
1. Load the test page
2. Click on the "Set Background Red" button JUST ONCE. (you have to resize the
windo for the complete background to be repainted - that is a separate bug.)
3. Click on "Remove..." button to remove the bgcolor attribute. Resizing
doesn't clear the red background.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 1886 ***
QA Contact: sujay → gerardok
Status: RESOLVED → VERIFIED
QA Contact: gerardok → sujay
verified in 12/7 build.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: