Relative links not linkified in "View Selection Source"

RESOLVED FIXED in mozilla30

Status

()

enhancement
RESOLVED FIXED
11 years ago
5 years ago

People

(Reporter: smrank, Assigned: jkitch)

Tracking

Trunk
mozilla30
x86
Windows XP
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

Reporter

Description

11 years ago
Steps to Reproduce:
1. Highlight a relative link on a page.
2. On context menu go to "View Selection Source".

Only absolute links are linkified in selection/DOM source, whereas all links are linkified in normal view source.

Using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081110 Minefield/3.1b2pre
Note to would-be implementors, if they aren't named Curtis: See bug 17612 for original implementation of source linking.  :)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee

Updated

5 years ago
Assignee: nobody → jkitch.bug
Assignee

Comment 2

5 years ago
Posted patch Part 1: protocol changes (obsolete) — Splinter Review
Stores baseURI within nsIViewSourceChannels for use in non-srcdoc documents.

Nothing terribly exciting.
Attachment #8372993 - Flags: review?(bzbarsky)
Assignee

Comment 3

5 years ago
This adds a new method to nsIWebNavigation to allow a loadURI variant with an extra argument.  (The existing loadURI is used in too many places to consider changing it).

I've tried to make it clear within the interface comments that the new method will only differ in specific situations (namely view-source: URIs and then only some of the time).  Any other possible behaviour is unimplemented.
Attachment #8372994 - Flags: review?(bzbarsky)
Assignee

Comment 4

5 years ago
We now check every (view-source) channel for presence of baseURI, before falling back to the old method.  This gives the data URIs of view selection source an awareness 

In principle, non-srcdoc, non-selection channels will also use the channel baseURI rather than the fallback method.  But this requires a deliberate choice to implement the appropriate codepaths to enable ir.
Attachment #8372995 - Flags: review?(hsivonen)
Assignee

Comment 5

5 years ago
This passes a base URI to a variant of the webnav LoadURI function to allow relative URIs to work in view selection source.
Attachment #8372996 - Flags: review?(dolske)
Comment on attachment 8372993 [details] [diff] [review]
Part 1: protocol changes

> Returns a nullptr when it isn't set or isn't a

s/a nullptr/null/

r=me
Attachment #8372993 - Flags: review?(bzbarsky) → review+
Comment on attachment 8372994 [details] [diff] [review]
Part2: WebNavigation Changes

This seems like it might better go on the settings object bug 965413 will add.  Maybe file a followup to consider moving it there once that bug lands?
Attachment #8372994 - Flags: review?(bzbarsky) → review+
Attachment #8372996 - Flags: review?(dolske) → review+
Assignee

Updated

5 years ago
Blocks: 971432
Attachment #8372995 - Flags: review?(hsivonen) → review+
Assignee

Comment 8

5 years ago
Attachment #8372993 - Attachment is obsolete: true
Assignee

Updated

5 years ago
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.