Honor the first <base href> in doc for base URL and the first <base target> in the doc for the default browsing context target

RESOLVED FIXED in mozilla2.0b10

Status

()

Core
DOM: Core & HTML
P1
normal
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: hsivonen, Assigned: bz)

Tracking

(Depends on: 1 bug)

Trunk
mozilla2.0b10
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(blocking2.0 final+)

Details

(Whiteboard: [softblocker])

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
The HTML5 spec changed to honor the first <base href> in the doc and the first <base target> in the doc instead of honoring the first one in <head> only.

See http://lists.w3.org/Archives/Public/public-html/2010Dec/0060.html
http://html5.org/tools/web-apps-tracker?from=5710&to=5711

This should be implemented in Gecko in order to resolve bug 593807 and bug 592880.
Created attachment 499427 [details] [diff] [review]
Allow <base> elements that are not direct children of the <head>.
Attachment #499427 - Flags: review?(jonas)
Assignee: nobody → bzbarsky
Priority: -- → P1
Whiteboard: [need review]
(Reporter)

Comment 2

8 years ago
At http://mxr.mozilla.org/mozilla-central/source/parser/html/nsHtml5TreeBuilderCppSupplement.h#152 the part 
152         } else if (nsHtml5Atoms::base == aName &&
153             (mode == NS_HTML5TREE_BUILDER_IN_HEAD ||
154              mode == NS_HTML5TREE_BUILDER_AFTER_HEAD)) {
needs to become
152         } else if (nsHtml5Atoms::base == aName) {
to make the preloads agree with the DOM side.
(Reporter)

Comment 3

8 years ago
Created attachment 500823 [details] [diff] [review]
Fix the speculative loading code to agree with the DOM code
(Reporter)

Updated

8 years ago
Attachment #500823 - Flags: review?(jonas)
Whiteboard: [need review] → [need approval]
Whiteboard: [need approval] → [need landing]

Updated

8 years ago
blocking2.0: ? → final+
Whiteboard: [need landing] → [need landing][softblocker]
Pushed the changes in this bug:
  http://hg.mozilla.org/mozilla-central/rev/17aa7cd8fe48
  http://hg.mozilla.org/mozilla-central/rev/11b1e456a331

and then an orange fix:
  http://hg.mozilla.org/mozilla-central/rev/1c5a0e0b5d0b
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing][softblocker] → [softblocker]
Target Milestone: --- → mozilla2.0b10
You need to log in before you can comment on or make changes to this bug.