Closed Bug 83159 Opened 23 years ago Closed 23 years ago

HTML Embed region is not painted correctly

Categories

(Core Graveyard :: Plug-ins, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: chrispetersen, Assigned: peterlubczynski-bugs)

References

()

Details

(Keywords: topembed)

Attachments

(2 files, 6 obsolete files)

Build: 2001052904
Platform: Windows and Mac 9(QT plugin not avaiable for Linux)
Expected Results: Embed area should be painted with the bgcolor of the page.
What I got: The Embed area (outside of the QT movie) is displayed as grey
Steps to reproduce: 
1) Install QT plugin
2) Go to Apple's url
3) Embed region is displayed grey.
Summary: Embed region is not painted correctly → HTML Embed region is not painted correctly
Attached file reduced test case of issue (deleted) —
-->peterl
Assignee: av → peterlubczynski
nominating mozilla0.9.2
Keywords: mozilla0.9.2
This is probably in the Paint() method. Over to Chris Karnaze....
Assignee: peterlubczynski → karnaze
Priority: -- → P3
Target Milestone: --- → mozilla0.9.2
Moving to m0.9.3
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.2 → mozilla0.9.3
*** Bug 88995 has been marked as a duplicate of this bug. ***
Missed 0.9.3.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Target Milestone: mozilla0.9.4 → mozilla0.9.5
reassigning to m0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
my bug
Assignee: karnaze → peterlubczynski
Status: ASSIGNED → NEW
Keywords: mozilla0.9.2
Attached patch windows fix (obsolete) (deleted) — Splinter Review
Attached patch windows fix (obsolete) (deleted) — Splinter Review
Peter, do you this problem on windows?
Comment on attachment 56192 [details] [diff] [review]
windows fix

This patch does not fix it for me on Windows. 
GetStyleData rerurns 0xffffff for the color which I beleive is white.
Okay, I think I know what's going on. There are several problems here. Andrei
shows that we are not mapping background style color correctly in content. I see
where I think I can fix this in nsHTMLObjectElement.cpp and
nsHTMLAppletElement.cpp, but what about the EMBED tag? cc:ing Jonny as I recall
it was removed recently in bug 107453.

On Mac, RGBBackColor() does do the trick and needs to be called with the
background color from style. It needs to be called before a paint update. For
some reason, it doesn't always work on the first update so I thought it wasn't
working at all :-/ This could be because of the above background mapping
problem, I wasn't calling it on the right port, or maybe Quicktime also expects
it to be set in NPP_SetWindow() where we also pass the port.
Status: NEW → ASSIGNED
The code for <embed> now lives in nsHTMLSharedLeafElement.cpp, check that
mNodeInfo->Equals(nsHTMLAtoms::embed) before doing embed specific things.
Attachment #56192 - Attachment is obsolete: true
Attached patch window fix (obsolete) (deleted) — Splinter Review
I found one more problem: turns out that since the body background color doesn't
get inherited up to the OBJECT tag, I have to walk up the frame tree to find the
first non-transparent parent and use his background color.

That last patch should fix this problem on all platforms that use child windows.
Since Mac doesn't....I still need to fix it up.
Can scx->GetStyleData fail or return null |color|? If it can there should be 
some sort of check for the condition. Also, in such a case it would be better to 
have |ResolveBackgroundColor()| return nsresult and pass the actual color via an 
argument.
The changes to nsHTMLSharedLeafElement.cpp should be specific to embed, no? If
so then, again, you need to check that mNodeInfo->Equals(nsHTMLAtoms::embed)
before doing embed specific things.
Attachment #56635 - Attachment description: complete window fix → window fix
Attachment #56635 - Attachment is obsolete: true
Attached patch better patch (obsolete) (deleted) — Splinter Review
It turns out the XP code does correctly set the background color of the widget
on Mac! That last patch works well, please review.

Sticking points:
* Changes in nsHTMLSharedLeafElement.cpp are isolated to embed tags. The mapping
in |EmbedMapAttributesIntoRule()| should only be called by embed tags. The
impact check is also inside a |mNodeInfo->Equals(nsHTMLAtoms::embed|.
* I couldn't find any code that checks the return of |GetStyleData| before using
it and I don't feel like starting a trend.
Keywords: 4xp, patch, review
Comment on attachment 56720 [details] [diff] [review]
better patch

This patch works neatly. r=av
Attachment #56720 - Flags: review+
Hmm, after thinking about this some more, why do we need the changes in the
content code? The attributes "background" and "bgcolor" mean nothing on embed,
applet or object, at least not according to the spec. Are those changes for
compatibility issues?
Jonny is right. The spec doesn't say anything about bgcolor or background
attributes on these tags even if some authors use them. New patch without
mappings coming up...
Attached patch new patch (obsolete) (deleted) — Splinter Review
Someone more familiar with layout-land should sr this one, for what it's woth,
it looks good to me.
Comment on attachment 56790 [details] [diff] [review]
new patch

fix the indentation on the 'else' and 'break' and sr=attinasi
Attachment #56790 - Flags: superreview+
Comment on attachment 56790 [details] [diff] [review]
new patch

Tested on Windows, r=av
Attachment #56790 - Flags: review+
patch checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: edt0.9.4
Resolution: --- → FIXED
Tested using 11_07_09 trunk build on Win2000 - verified fixed. Will verify cross
platform tomorrow and mark bug.
Tested on:
MacOS9: 11_08_04_trunk
MacOS10: 11_08_08_trunk

This bug is not fixed on MacOS9 or MacOS10. At initial painting, you still get
the original gray background. If you resize the page, then the background color
is white. Reload again and the color is back to its initial gray. 

Ok, still doesn't work on the Mac. fix on it's way.....
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch mac patch (deleted) — Splinter Review
Can I get some reviews on this new patch? Thanks.
Attachment #56191 - Attachment is obsolete: true
Attachment #56196 - Attachment is obsolete: true
Attachment #56720 - Attachment is obsolete: true
Attachment #56790 - Attachment is obsolete: true
Comment on attachment 57122 [details] [diff] [review]
mac patch

Fix the confusing comments:

+	// return (color8 == 0xFF ? 0xFFFF : (color8 << 8));
+	return (color8 << 8) | color8;	/* (color8 * 257) == (color8 * 0x0101)
*/
and sr=sfraser
Attachment #57122 - Flags: superreview+
a=asa (on behalf of drivers) for checkin to 0.9.6
Keywords: mozilla0.9.6+
Comment on attachment 57122 [details] [diff] [review]
mac patch

r=av
Attachment #57122 - Flags: review+
Patch should be in today's builds. Marking FIXED.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Verifying this problem has been resolved in OS 9 and OS X trunk builds
(2001-11-09-08).
marked verified
Status: RESOLVED → VERIFIED
Did this get checked into the 0.9.6 branch?
Confirming issue is resolved in the 2001-11-14-11 0.9.6 build. Tested under
Windows ME.
minusing. thanks for raising the issue.
Keywords: edt0.9.4edt0.9.4-
Keywords: topembed
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: