Closed Bug 700854 Opened 13 years ago Closed 13 years ago

{Media,Image,Video}Document should reference an external stylesheet for use in styling their contents

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: jaws, Assigned: jaws)

References

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 3 obsolete files)

MediaDocument.cpp, ImageDocument.cpp, and VideoDocument.cpp should reference an external stylesheet.

We need to move the styles out to an external stylesheet before we can fix bug 376997.
Blocks: 700856
Attached patch Patch for bug 700854 (obsolete) — Splinter Review
This patch is part of the patch for bug 376997. I have pushed it to the tryserver: https://tbpl.mozilla.org/?tree=Try&rev=5525e6d4e319

There should be no UI changes with this patch, it is just to setup the plumbing for bug 700856.
Assignee: nobody → jwein
Status: NEW → ASSIGNED
Attachment #573043 - Flags: review?(roc)
Attached patch Patch for bug 700854 (obsolete) — Splinter Review
This patch references a ImageDocument.css and VideoDocument.css instead of MediaDocument.css. Styles will be moved to the stylesheets in bug 700856, which I'll land at the same time.

I couldn't push to try because of bug 701232.
Attachment #573043 - Attachment is obsolete: true
Attachment #573374 - Flags: review?(roc)
Comment on attachment 573374 [details] [diff] [review]
Patch for bug 700854

Review of attachment 573374 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/document/src/VideoDocument.cpp
@@ +151,5 @@
> +
> +    link->SetAttr(kNameSpaceID_None, nsGkAtoms::href, 
> +                  NS_LITERAL_STRING("resource://gre/res/VideoDocument.css"), true);
> +
> +    head->AppendChildTo(link, false);

Create a superclass helper function to share this code.
Attached patch Patch for bug 700854 v1.1 (obsolete) — Splinter Review
Moved the duplicated code to a function within MediaDocument.
Attachment #573374 - Attachment is obsolete: true
Attachment #573374 - Flags: review?(roc)
Attachment #573390 - Flags: review?(roc)
Carrying forward r+ from roc. I've renamed the CSS files to TopLevel*Document.css since they only apply when the synthetic document is top level.

Pushed to try and waiting to land with bug 700856.

https://tbpl.mozilla.org/?tree=Try&rev=816cb0059256
Attachment #573390 - Attachment is obsolete: true
Attachment #573558 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/40b0d61c132b
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Why are these in /res/ ? 
Themers (like me) want to theme the background of these pages, so that it would fit better in there theme.
Depends on: 708431
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: