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

RESOLVED FIXED in mozilla11

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jaws, Assigned: jaws)

Tracking

unspecified
mozilla11
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment, 3 obsolete attachments)

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
Created attachment 573043 [details] [diff] [review]
Patch for bug 700854

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)
Attachment #573043 - Flags: review?(roc) → review+
Created attachment 573374 [details] [diff] [review]
Patch for bug 700854

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.
Created attachment 573390 [details] [diff] [review]
Patch for bug 700854 v1.1

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)
Attachment #573390 - Flags: review?(roc) → review+
Created attachment 573558 [details] [diff] [review]
Patch for bug 700854 v1.1 (renamed css files)

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/integration/fx-team/rev/f828518abaf2
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/40b0d61c132b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/f828518abaf2

Comment 9

6 years ago
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.

Updated

5 years ago
Depends on: 708431
Blocks: 702800
You need to log in before you can comment on or make changes to this bug.