Last Comment Bug 700854 - {Media,Image,Video}Document should reference an external stylesheet for use in styling their contents
: {Media,Image,Video}Document should reference an external stylesheet for use i...
Status: RESOLVED FIXED
[fixed-in-fx-team]
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
:
Mentors:
Depends on: 708431
Blocks: 376997 700856 702800
  Show dependency treegraph
 
Reported: 2011-11-08 16:03 PST by (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
Modified: 2012-01-01 11:02 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch for bug 700854 (7.90 KB, patch)
2011-11-08 16:51 PST, (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
roc: review+
Details | Diff | Review
Patch for bug 700854 (14.47 KB, patch)
2011-11-09 16:58 PST, (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
no flags Details | Diff | Review
Patch for bug 700854 v1.1 (15.35 KB, patch)
2011-11-09 17:34 PST, (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
roc: review+
Details | Diff | Review
Patch for bug 700854 v1.1 (renamed css files) (14.66 KB, patch)
2011-11-10 10:17 PST, (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back)
jaws: review+
Details | Diff | Review

Description (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-08 16:03:11 PST
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.
Comment 1 (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-08 16:51:52 PST
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.
Comment 2 (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-09 16:58:04 PST
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.
Comment 3 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-11-09 17:00:31 PST
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.
Comment 4 (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-09 17:34:22 PST
Created attachment 573390 [details] [diff] [review]
Patch for bug 700854 v1.1

Moved the duplicated code to a function within MediaDocument.
Comment 5 (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-10 10:17:58 PST
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
Comment 6 (Away 6/25-7/4) Jared Wein [:jaws] (reviews and needinfo disabled until back) 2011-11-10 15:09:53 PST
https://hg.mozilla.org/integration/fx-team/rev/f828518abaf2
Comment 7 Rob Campbell [:rc] (:robcee) 2011-11-15 14:03:40 PST
https://hg.mozilla.org/mozilla-central/rev/40b0d61c132b
Comment 8 Rob Campbell [:rc] (:robcee) 2011-11-15 14:10:12 PST
https://hg.mozilla.org/mozilla-central/rev/f828518abaf2
Comment 9 Alfred Kayser 2011-11-16 01:21:25 PST
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.

Note You need to log in before you can comment on or make changes to this bug.