REGRESSION (r104000): AdBlock extension fails to load/function
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 22:32:25 +0000 (22:32 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 22:32:25 +0000 (22:32 +0000)
commit81d6a0e5292b2105cfaec92eae7014dcd04acbf8
tree020a8c1a674e57b4f9a2b5098ea023ce746a9273
parent6b2022575ae35865491c6b52ef2e66b4fe825ee8
REGRESSION (r104000): AdBlock extension fails to load/function
https://bugs.webkit.org/show_bug.cgi?id=75554

Reviewed by Andy Estes.

Source/WebCore:

Previously, we would claim the documentElement was available before
we'd actually attached it to the DOM (which we now do via the
attachment queue).  This issue was noted in the code with a FIXME
comment, but there was no test coverage for the issue.  This patch
resolves the FIXME and adds a test.

Test: userscripts/document-element-available-at-start.html

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):

LayoutTests:

This test checks that the documentElement is available when user
scripts are run at document start.

* userscripts/document-element-available-at-start-expected.txt: Added.
* userscripts/document-element-available-at-start.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/userscripts/document-element-available-at-start-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/document-element-available-at-start.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLConstructionSite.cpp