Make setting body.style.background invalidate the whole canvas so the

background is repainted correctly. r=kmcclusk@netscape.com, sr=attinasi
This commit is contained in:
bzbarsky@mit.edu
2001-10-23 22:08:30 +00:00
parent 3bbbd163f8
commit acf70aedb1
4 changed files with 10 additions and 4 deletions

View File

@@ -9999,7 +9999,9 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
// first check if it is a background change:
// - if it is then we may need to notify the canvas frame
// so it can take care of invalidating the whole canvas
if (aAttribute == nsHTMLAtoms::bgcolor || aAttribute == nsHTMLAtoms::background) {
if (aAttribute == nsHTMLAtoms::bgcolor ||
aAttribute == nsHTMLAtoms::background ||
aAttribute == nsHTMLAtoms::style) {
// see if the content element is the root (HTML) or BODY element
// NOTE: the assumption here is that the background color or image on
// the BODY or HTML element need to have the canvas frame invalidate

View File

@@ -691,7 +691,8 @@ CanvasFrame::AttributeChanged(nsIPresContext* aPresContext,
// if the background color or image is changing, invalidate the canvas
if (aHint > 0){
if (aAttribute == nsHTMLAtoms::bgcolor ||
aAttribute == nsHTMLAtoms::background) {
aAttribute == nsHTMLAtoms::background ||
aAttribute == nsHTMLAtoms::style) {
Invalidate(aPresContext,mRect,PR_FALSE);
}
}

View File

@@ -691,7 +691,8 @@ CanvasFrame::AttributeChanged(nsIPresContext* aPresContext,
// if the background color or image is changing, invalidate the canvas
if (aHint > 0){
if (aAttribute == nsHTMLAtoms::bgcolor ||
aAttribute == nsHTMLAtoms::background) {
aAttribute == nsHTMLAtoms::background ||
aAttribute == nsHTMLAtoms::style) {
Invalidate(aPresContext,mRect,PR_FALSE);
}
}

View File

@@ -9999,7 +9999,9 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
// first check if it is a background change:
// - if it is then we may need to notify the canvas frame
// so it can take care of invalidating the whole canvas
if (aAttribute == nsHTMLAtoms::bgcolor || aAttribute == nsHTMLAtoms::background) {
if (aAttribute == nsHTMLAtoms::bgcolor ||
aAttribute == nsHTMLAtoms::background ||
aAttribute == nsHTMLAtoms::style) {
// see if the content element is the root (HTML) or BODY element
// NOTE: the assumption here is that the background color or image on
// the BODY or HTML element need to have the canvas frame invalidate