Bug 17023

Summary: script element created with html element as parent
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, commit-queue, ddkilzer, hyatt, ian, mitz
Priority: P2    
Version: 419.x   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,%3C!doctype%20html%3E%0A%3Cscript%3E%0Aif%20(document.getElementsByTagName(%22script%22)%5B0%5D.parentNode.tagName.toUpperCase()%20%3D%3D%20%22HEAD%22)%0A%09document.write(%22PASS%22)%0Aelse%0A%09document.write(%22FAIL%22)%0A%3C%2Fscript%3E
Attachments:
Description Flags
Patch commit-queue: commit-queue-

Sam Sneddon [:gsnedders]
Reported 2008-01-26 10:16:36 PST
As the above test case shows, the script element can be created with the html element as its parent. This apparently also exists in trunk, though I haven't tested this myself. I've occasionally seen link elements as a direct descendant of the html element, but I've never been able to consistently reproduce this (even with a single page) — possibly related?
Attachments
Patch (1.81 KB, patch)
2010-09-20 02:38 PDT, Adam Barth
commit-queue: commit-queue-
Sam Sneddon [:gsnedders]
Comment 1 2008-01-26 12:43:10 PST
Yeah, this does appear still in trunk, now I've actually tested it myself.
David Kilzer (:ddkilzer)
Comment 2 2008-02-20 07:42:03 PST
Occurs with Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.11 (8S165) as well.
David Kilzer (:ddkilzer)
Comment 3 2008-02-20 07:42:52 PST
Also tested with a local debug build of WebKit r30353 with Safari 3.0.4 (523.12.2) on 10.4.11.
Dave Hyatt
Comment 4 2008-02-20 13:00:13 PST
What does HTML5 say?
Ian 'Hixie' Hickson
Comment 5 2008-02-20 13:18:56 PST
Do you want me to paste the entire HTML5 parsing section into the bug? :-)
mitz
Comment 6 2008-02-20 13:20:42 PST
(In reply to comment #4) > What does HTML5 say? That <script> should behave like <base>, <link>, <meta> and <style> in the "before head" insertion mode and create an implicit <head>.
Dave Hyatt
Comment 7 2008-02-20 13:22:33 PST
(In reply to comment #5) > Do you want me to paste the entire HTML5 parsing section into the bug? :-) > Smartass. :)
Adam Barth
Comment 8 2010-09-20 02:38:23 PDT
WebKit Commit Bot
Comment 9 2010-09-20 09:49:17 PDT
Comment on attachment 68063 [details] Patch Clearing flags on attachment: 68063 Committed r67857: <http://trac.webkit.org/changeset/67857>
WebKit Commit Bot
Comment 10 2010-09-20 09:49:22 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 11 2010-09-20 09:58:39 PDT
Comment on attachment 68063 [details] Patch Rejecting patch 68063 from commit-queue. Unexpected failure when processing patch! Please file a bug against webkit-patch. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'land-attachment', '--force-clean', '--non-interactive', '--ignore-builders', '--quiet', '--parent-command=commit-queue', 68063]" exit_code: 1 Last 500 characters of output: 68063&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=17023&ctype=xml Processing 1 patch from 1 bug. Cleaning working directory Updating working directory Processing patch 68063 from bug 17023. NOBODY (OOPS!) found in /Projects/CommitQueue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py. ERROR: /Projects/CommitQueue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Note You need to log in before you can comment on or make changes to this bug.