Bug 47046
Summary: | REGRESSION (r63517): Apple concierge website broken because of text node between HEAD and BODY | ||
---|---|---|---|
Product: | WebKit | Reporter: | mitz |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Major | CC: | abarth, aestes, ap, hsivonen, ian |
Priority: | P1 | Keywords: | InRadar, Regression |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://concierge.apple.com/store/R075 | ||
Bug Depends on: | |||
Bug Blocks: | 41115 |
mitz
In TOT, the product tiles at http://concierge.apple.com/store/R075 do not respond to hovering over them or clicking them. The Inspector console reports
HIERARCHY_REQUEST_ERR: DOM Exception 3: A Node was inserted somewhere it doesn't belong.
An inspection of the DOM reveals that the BODY element’s previous sibling is a text node. In Safari 5.0.2, the BODY element’s previous sibling is the HEAD element.
This is a reduction:
<head></head> <body><script>alert(document.body.previousSibling)</script></body>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
mitz
<rdar://problem/8505994>
mitz
Caused by <http://trac.webkit.org/changeset/63517>.
Adam Barth
The site is also broken in Firefox 4. Perhaps we can evangalize the site to use document.head or document.getElementsByTagName('head')[0] to local the head element?
Alexey Proskuryakov
Does this HTML5 behavior match any shipping browser?
Adam Barth
I complained about this change when we first implemented it. I can dig up the W3C bug if you like. The spec skips some whitespace nodes early in the document for compatibility. At the time Ian's position was that skipping these nodes is aesthetically ugly because you lose information about the original document. You can see this effect, for example, when you serialize the DOM back to a string.
My guess is this issue will come down to an estimate of how many cites are affected. If this is the first one that we and Henri have seen, we might try to evangelize it (especially since it's from a company that, you know, makes a web browser). If we see more examples, we might want to change the spec.
Henri Sivonen
(In reply to comment #5)
> If this is the first one that we and Henri have seen
I don't recall seeing this before.
Andy Estes
I don't see this bug on the live site anymore. I can hover over the product categories and they gain border highlighting; I can also click them. Mitz, can you confirm this?
mitz
I cannot reproduce the symptom with a build of TOT.
Adam Barth
Please feel free to re-open this bug if we find more examples.