Bug 19646 - CSS style "display:none;" ignored by "object" and "embed" HTML tags
Summary: CSS style "display:none;" ignored by "object" and "embed" HTML tags
Status: RESOLVED DUPLICATE of bug 15081
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-06-17 18:59 PDT by Thom
Modified: 2008-06-18 22:34 PDT (History)
3 users (show)

See Also:


Attachments
reduction: object with inline style (902 bytes, text/html)
2008-06-17 19:13 PDT, Thom
no flags Details
reduction: object with style attribute (300 bytes, text/html)
2008-06-17 19:18 PDT, Thom
no flags Details
expanded test case (623 bytes, text/html)
2008-06-17 19:34 PDT, Thom
no flags Details
style in head declares any object tag to not be displayed (425 bytes, text/html)
2008-06-17 19:38 PDT, Thom
no flags Details
reduced case: object of specific size to not display (452 bytes, text/html)
2008-06-17 19:42 PDT, Thom
no flags Details
reduced case: specific class to not display (428 bytes, text/html)
2008-06-17 19:49 PDT, Thom
no flags Details
reduced case: object of specific class to not display (434 bytes, text/html)
2008-06-17 19:52 PDT, Thom
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thom 2008-06-17 18:59:42 PDT
The "display: none;" style has no visible effect on either the "object" tag or the "embed" tag. This has been true for many versions, ever since Safari 1, and I've sent in a bug report through Safari way back then. As far as I've noticed, this behavior has not changed during each version since then, so likely these tags have never complied with the style "display: none;".

The reason I've noticed it not working is because I've created a custom CSS style sheet and have selected it within Safari's preferences, and the content within these tags have continued to be displayed every version. I have also used a reduced style sheet to test only the "object" or "embed" tags with the style "display: none;" when visiting various web pages.

I haven't found any documentation suggesting "object" and "embed" tags should be exceptional and ignore "display:none;", so I"m pretty sure this isn't standard behavior.

I've tried using "display: none;" within the tag, within the document, and in a separate style sheet document, but the tags will not disappear. I've tried using IDs and classes, and also referencing by attributes such as width and height, but nothing will get an "object" tag or an "embed" tag to acknowledge and comply with the style.

Have noticed <a http="https://bugs.webkit.org/show_bug.cgi?id=15081">bug# 15081</a> describes the problem (different OS version) and provides a suitable reduction. However, the "Plug-ins" category doesn't seem appropriate since this really seems something do with the CSS style not being applied.
Comment 1 Thom 2008-06-17 19:05:44 PDT
At the moment, this is r34604
Comment 2 Thom 2008-06-17 19:13:07 PDT
Created attachment 21804 [details]
reduction: object with inline style

This is copied from bug# 15081 .
Comment 3 Thom 2008-06-17 19:15:20 PDT
Comment on attachment 21804 [details]
reduction: object with inline style

<object style="display: none;" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="480" height="376" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">
  <param name="src" value="http://movies.apple.com/movies/us/apple/getamac/apple-getamac-genius_480x376.mov">
</object>
Comment 4 Thom 2008-06-17 19:16:16 PDT
Comment on attachment 21804 [details]
reduction: object with inline style

arrg! Talk about embarrassing. I can't delete the attachments.
Comment 5 Thom 2008-06-17 19:18:47 PDT
Created attachment 21805 [details]
reduction: object with style attribute
Comment 6 Thom 2008-06-17 19:34:13 PDT
Created attachment 21806 [details]
expanded test case

A few possibilities for applying style from within the head of an HTML document. Tried tag name, class, and width and height attributes.
Comment 7 Thom 2008-06-17 19:38:47 PDT
Created attachment 21807 [details]
style in head declares any object tag to not be displayed

reduced case:
object { display:none; }
Comment 8 Thom 2008-06-17 19:42:51 PDT
Created attachment 21808 [details]
reduced case: object of specific size to not display

reduced case with specific size attributes:
 
object[width="480"][height="376"] { display:none; }
Comment 9 Thom 2008-06-17 19:49:02 PDT
Created attachment 21809 [details]
reduced case: specific class to not display

reduced case: a specific class should not display, object is assigned to class

.hidethis { display:none; }
Comment 10 Thom 2008-06-17 19:52:14 PDT
Created attachment 21810 [details]
reduced case: object of specific class to not display

reduced case: object of a specific class is specified to not display.

object.hidethis { display:none; }
Comment 11 mitz 2008-06-17 23:55:17 PDT
Thanks for taking the time to create and post the test cases! Even if you think bug 15081 has the wrong component, having a second bug on the exact same issue does not help.
Comment 12 Alexey Proskuryakov 2008-06-18 12:13:01 PDT
There's also bug 10234. I think it's confusing to have three bugs talking about what's almost the same issue.
Comment 13 Thom 2008-06-18 19:33:32 PDT
(In reply to comment #11)
> Thanks for taking the time to create and post the test cases! Even if you think
> bug 15081 has the wrong component, having a second bug on the exact same issue
> does not help.
> 

Sorry, your right, it does seem like a duplicate. I wasn't sure whether reporting for a different system version mattered, and what differences needed to be tracked. Also wasn't too sure what could and couldn't be changed, but I've figured out few things about this reporting system now that I've tried it a little bit.
Comment 14 Thom 2008-06-18 19:43:31 PDT
(In reply to comment #12)
> There's also bug 10234. I think it's confusing to have three bugs talking about
> what's almost the same issue.
> 

Ah, missed that one when reviewing other reports. Yes, I believe that is the same thing, too.

I'm just not sure how to combine these three, especially since bug# 15081 is marked as InRadar. (Don't want to mess this up further.)
Comment 15 Alexey Proskuryakov 2008-06-18 22:34:20 PDT
To avoid further confusion, it is best to keep the bug that has a Radar twin.

*** This bug has been marked as a duplicate of 15081 ***