Title: [105321] trunk
- Revision
- 105321
- Author
- [email protected]
- Date
- 2012-01-18 14:32:25 -0800 (Wed, 18 Jan 2012)
Log Message
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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (105320 => 105321)
--- trunk/LayoutTests/ChangeLog 2012-01-18 22:27:41 UTC (rev 105320)
+++ trunk/LayoutTests/ChangeLog 2012-01-18 22:32:25 UTC (rev 105321)
@@ -1,3 +1,16 @@
+2012-01-18 Adam Barth <[email protected]>
+
+ REGRESSION (r104000): AdBlock extension fails to load/function
+ https://bugs.webkit.org/show_bug.cgi?id=75554
+
+ Reviewed by Andy Estes.
+
+ 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.
+
2012-01-18 Brian Salomon <[email protected]>
[SKIA / CHROMIUM] Add some canvas tests to test_expectations to prepare for changes to use sw-rasterized paths in skia-gpu
Added: trunk/LayoutTests/userscripts/document-element-available-at-start-expected.txt (0 => 105321)
--- trunk/LayoutTests/userscripts/document-element-available-at-start-expected.txt (rev 0)
+++ trunk/LayoutTests/userscripts/document-element-available-at-start-expected.txt 2012-01-18 22:32:25 UTC (rev 105321)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 1: SUCCESS
+This test should log a console message on success.
Added: trunk/LayoutTests/userscripts/document-element-available-at-start.html (0 => 105321)
--- trunk/LayoutTests/userscripts/document-element-available-at-start.html (rev 0)
+++ trunk/LayoutTests/userscripts/document-element-available-at-start.html 2012-01-18 22:32:25 UTC (rev 105321)
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.addUserScript("if (document.documentElement) console.log('SUCCESS');", true, true);
+}
+</script>
+</head>
+<body>
+This test should log a console message on success.
+<iframe src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (105320 => 105321)
--- trunk/Source/WebCore/ChangeLog 2012-01-18 22:27:41 UTC (rev 105320)
+++ trunk/Source/WebCore/ChangeLog 2012-01-18 22:32:25 UTC (rev 105321)
@@ -1,3 +1,21 @@
+2012-01-18 Adam Barth <[email protected]>
+
+ REGRESSION (r104000): AdBlock extension fails to load/function
+ https://bugs.webkit.org/show_bug.cgi?id=75554
+
+ Reviewed by Andy Estes.
+
+ 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):
+
2012-01-18 Eric Carlson <[email protected]>
Provide access to user's list of preferred languages
Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (105320 => 105321)
--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2012-01-18 22:27:41 UTC (rev 105320)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2012-01-18 22:32:25 UTC (rev 105321)
@@ -196,7 +196,8 @@
element->parserSetAttributeMap(token.takeAttributes(), m_fragmentScriptingPermission);
attachLater(m_attachmentRoot, element);
m_openElements.pushHTMLHtmlElement(element);
- // FIXME: We probably need to call executeQueuedTasks() before calling these methods.
+
+ executeQueuedTasks();
element->insertedByParser();
dispatchDocumentElementAvailableIfNeeded();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes