Closed Bug 44396 Opened 25 years ago Closed 25 years ago

The LINK element needs to act like the A element

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: attinasi)

References

()

Details

(Keywords: testcase, Whiteboard: [nsbeta3+] (py8ieh: regressed))

Attachments

(1 file)

This was exposed by the fix to bug 6306. STEPS TO REPRODUCE Go to this page: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/linktests.html 1. Hover over one of the links at the top of the page. 2. Click on one of the links at the top of the page. 3. Click just to the side of the text of the links at the top of the page. 4. Do steps 1-3 again on any of the links lower down the page. ACTUAL RESULTS The LINK elements _look_ like links, but are not actually links. The bugs are: 1. The URL does not appear in the status bar. 2. Clicking on the text does not work, although clicking on the text of the AREA or A elements works fine (in all three cases the link texts are generated content so why the difference?). 3. Clicking on the LINK element does not cause the browser to follow the link. EXPECTED RESULTS The same should happen for the LINK element as for the A and AREA elements. TESTED ON Windows NT using Mozilla Win32 build 2000062920.
Fixing this bug will allow authors to do cool things like: http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/link2.html
Blocks: html4.01
Keywords: testcase
Why do we want to do this? The A element has all the power of the LINK element (rel and rev), doesn't it? What does the HTML4 spec say? Should this wait until CSS describes links?
Mark, can you take a look.
Assignee: clayton → attinasi
HTML 4 spec says LINKs are really cool: see http://www.w3.org/TR/html401/struct/links.html#h-12.3 I'm not sure I understand what this has to do with CSS - we style the LINK content correctly, it is the behavior that is bad (missing, actually). If we are to support the LINK element then we should probably make it do something useful, otherwise we probably want to ignore the element altogether. Currently we half-support it, making it look like a link but not act like a link. I'll look into what needs to happen to make LINK elements act like links, but this probably isn't a terribly high priority.
Status: NEW → ASSIGNED
Nominating for nsbeta3: We style it like a link, we should allow navigation through it like a link.
Keywords: nsbeta3
Target Milestone: --- → M20
Easy fix: the nsHTMLLinkElement::HandleDOMEvent needs to do what the nsHTMLAreaElement does, namely call mInner.HandleDOMEventForAnchors instead of mInner.HandleDOMEvent (note that HandleDOMEventForAnchors does call HandleDOMEvent internally, so the new action is a superset of the old action). Tested, works correctly. Will attach patch.
Keywords: patch
Keywords: correctness
Approving for beta3: have fix to get correct HTML4.01 behavior. Change is highly localized and very simple - low risk.
Whiteboard: [nsbeta3+]
Target Milestone: M20 → M18
Can somebody review this patch for me so I can check this in?
r=dbaron, although I'm still not sure this is a good thing to do. I guess no spec says we can't, though...
Fix checked in (nsHTMLLinkElement.cpp) Thanks for the review David.
Yes, fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Marking verified in the Aug 24th build.
Status: RESOLVED → VERIFIED
Indeed. Would you like to file a new bug?
Whiteboard: [nsbeta3+] → [nsbeta3+] (py8ieh: regressed)
New bug filed - bug 208588
cheers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: