Closed Bug 1249844 Opened 8 years ago Closed 8 years ago

in Print Preview, link expansion should be optional

Categories

(Core :: Print Preview, defect)

44 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Nick_Levinson, Unassigned)

Details

Print Preview expands links to show the linked-to URLs. Nice, but it's not an option. It should be, with Print implementing whatever we chose for Print Preview or Setup.
Component: File Handling → General
Component: General → Printing: Setup
Product: Firefox → Core
Component: Printing: Setup → Print Preview
I can't reproduce this with a trivial test URL:

data:text/html,<a href="http://www.mozilla.org/">Mozilla</a>

Can you provide a test page? It's likely this is the web page's doing, not Firefox's.
Flags: needinfo?(Nick_Levinson)
http://cold32.com/ (my site)
http://www.enomcentral.com/
http://www.geek.com/
http://whatever.scalzi.com/2012/07/26/who-gets-to-be-a-geek-anyone-who-wants-to-be/

Poking around roughly a couple of dozen of other domains, generally better known than the above, found no such effect almost anywhere else. My style of programming HTML and CSS can't be that rare, but I don't know how to find what other sites have something alike. The domains that do this but are not mine are associated with being geeky, but that may be too vague to be helpful here, and I checked various other geeky sites and did not find expansions.

Expansion apparently occurs throughout a page or not at all. I didn't check every link but it seems that there's no case of selective expansion.

Whether URLs are absolute or relative seems due to the HTML base element being ignored, if present at all.

I tried my site narrowed in Responsive Design View, but Print Preview showed the page as if Responsive Design View was off.

My page at cold32.com has two links not styled for touch-screen tapability. They're in the center column's main text, one in the fifth paragraph and one further down. So the CSS for touch-screen compatibility is not affecting this.

In Print Preview, if the link is expanded, the link text is followed by a space and then the URL in parentheses. That's the sort of expansion format that must have been explicitly programmed into Firefox and not the result of just a bug.
Flags: needinfo?(Nick_Levinson)
(In reply to Nick Levinson from comment #2)
> http://cold32.com/ (my site)

from main.css:

@media print {
...
    a[href]:after {
        content: " (" attr(href) ")";
    }
...

> http://www.enomcentral.com/

from css.ashx

/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
a[href]:after{content:" (" attr(href) ")"}


> http://www.geek.com/

from site.css:

a[href]:after{content:" (" attr(href) ")"}


> http://whatever.scalzi.com/2012/07/26/who-gets-to-be-a-geek-anyone-who-wants-
> to-be/

From global-print.css:

.entry-content a[href]:after, .entry a[href]:after {
	content:" (" attr(href) ")";
}

> Poking around roughly a couple of dozen of other domains, generally better
> known than the above, found no such effect almost anywhere else. My style of
> programming HTML and CSS can't be that rare, but I don't know how to find
> what other sites have something alike. The domains that do this but are not
> mine are associated with being geeky, but that may be too vague to be
> helpful here, and I checked various other geeky sites and did not find
> expansions.

All of these were deliberately styled this way by the page. I would assume that this is because they all reused the html5-boilerplate stylesheet.

You could potentially work around this using the stylish add-on, though I'm not sure if we apply user stylesheets to print media document, a priori I see no reason why we wouldn't.

In any case, it's not a Firefox feature and so it's hard / impossible to make this an option per se.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Wow. Thank you for the research. Yes, in my case, it came from H5BP and I had read the docs long ago but forgotten about that possibility and didn't think about my copied CSS possibly causing this. Thanks again.
You need to log in before you can comment on or make changes to this bug.