[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:52:29 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ffe348dfa38322e9ae378e055715baae18433cb0
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 26 22:45:51 2004 +0000
Reviewed by John.
<rdar://problem/3740855> REGRESSION: Flash incorrectly positioned at macromedia.com
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::scriptExecution): Do the prepending-src
trick as for inline script execution.
Added new layout tests covering this and other recent tokenizer
bugs.
* layout-tests/fast/tokenizer/001-expected.txt: Added.
* layout-tests/fast/tokenizer/001.html: Added.
* layout-tests/fast/tokenizer/002-expected.txt: Added.
* layout-tests/fast/tokenizer/002.html: Added.
* layout-tests/fast/tokenizer/003-expected.txt: Added.
* layout-tests/fast/tokenizer/003.html: Added.
* layout-tests/fast/tokenizer/resources/003-script.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/tokenizer/001-expected.txt b/LayoutTests/fast/tokenizer/001-expected.txt
new file mode 100644
index 0000000..4c0654f
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/001-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+ RenderBlock {P} at (0,116) size 784x18
+ RenderText {TEXT} at (0,0) size 254x18
+ text run at (0,0) width 254: "there should be a red box above this text"
diff --git a/LayoutTests/fast/tokenizer/001.html b/LayoutTests/fast/tokenizer/001.html
new file mode 100644
index 0000000..d863966
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/001.html
@@ -0,0 +1,6 @@
+<script>
+document.write ('<script src="nonexistent.js"></scr' + 'ipt><div ');
+document.write ('style="width: 100; height: 100; background-color: red"></div>');
+</script>
+<p>there should be a red box above this text</p>
+
diff --git a/LayoutTests/fast/parser/tabs-in-scripts-expected.txt b/LayoutTests/fast/tokenizer/002-expected.txt
similarity index 56%
copy from LayoutTests/fast/parser/tabs-in-scripts-expected.txt
copy to LayoutTests/fast/tokenizer/002-expected.txt
index 9a8c154..5536e4d 100644
--- a/LayoutTests/fast/parser/tabs-in-scripts-expected.txt
+++ b/LayoutTests/fast/tokenizer/002-expected.txt
@@ -3,5 +3,5 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x34
RenderBlock {HTML} at (0,0) size 800x34
RenderBody {BODY} at (8,8) size 784x18
- RenderText {TEXT} at (0,0) size 8x18
- text run at (0,0) width 8: "1"
+ RenderText {TEXT} at (0,0) size 315x18
+ text run at (0,0) width 315: "you shouldn't see a random chinese character here"
diff --git a/LayoutTests/fast/tokenizer/002.html b/LayoutTests/fast/tokenizer/002.html
new file mode 100644
index 0000000..7394ebb
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/002.html
@@ -0,0 +1,5 @@
+<script>
+document.write("<script src>");
+document.writeln("</scr" + "ipt>");
+</script>
+you shouldn't see a random chinese character here
diff --git a/LayoutTests/fast/tokenizer/003-expected.txt b/LayoutTests/fast/tokenizer/003-expected.txt
new file mode 100644
index 0000000..6abca62
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/003-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+ RenderBlock {DIV} at (0,100) size 784x18
+ RenderBlock (anonymous) at (0,0) size 784x18
+ RenderText {TEXT} at (0,0) size 211x18
+ text run at (0,0) width 211: "This should be below the red box"
+ RenderBlock {DIV} at (0,18) size 784x0
diff --git a/LayoutTests/fast/tokenizer/003.html b/LayoutTests/fast/tokenizer/003.html
new file mode 100644
index 0000000..4619a3b
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/003.html
@@ -0,0 +1,7 @@
+<body>
+
+<script type="text/javascript" language="JavaScript" src="resources/003-script.js"></script>
+
+<div>This should be below the red box<div>
+
+</body>
diff --git a/LayoutTests/fast/tokenizer/resources/003-script.js b/LayoutTests/fast/tokenizer/resources/003-script.js
new file mode 100644
index 0000000..46f216d
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/resources/003-script.js
@@ -0,0 +1 @@
+document.writeln('<div style="width: 100; height: 100; background-color: red"></div>');
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 21382e8..2ef72da 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2004-07-26 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by John.
+
+ <rdar://problem/3740855> REGRESSION: Flash incorrectly positioned at macromedia.com
+
+ * khtml/html/htmltokenizer.cpp:
+ (khtml::HTMLTokenizer::scriptExecution): Do the prepending-src
+ trick as for inline script execution.
+
+ Added new layout tests covering this and other recent tokenizer
+ bugs.
+
+ * layout-tests/fast/tokenizer/001-expected.txt: Added.
+ * layout-tests/fast/tokenizer/001.html: Added.
+ * layout-tests/fast/tokenizer/002-expected.txt: Added.
+ * layout-tests/fast/tokenizer/002.html: Added.
+ * layout-tests/fast/tokenizer/003-expected.txt: Added.
+ * layout-tests/fast/tokenizer/003.html: Added.
+ * layout-tests/fast/tokenizer/resources/003-script.js: Added.
+
2004-07-23 Ken Kocienda <kocienda at apple.com>
Reviewed by Trey
diff --git a/WebCore/khtml/html/htmltokenizer.cpp b/WebCore/khtml/html/htmltokenizer.cpp
index 6c0748d..e6241e7 100644
--- a/WebCore/khtml/html/htmltokenizer.cpp
+++ b/WebCore/khtml/html/htmltokenizer.cpp
@@ -580,9 +580,39 @@ void HTMLTokenizer::scriptExecution( const QString& str, QString scriptURL,
else
url = scriptURL;
+ TokenizerString *savedPrependingSrc = currentPrependingSrc;
+ TokenizerString prependingSrc;
+ currentPrependingSrc = &prependingSrc;
+
view->part()->executeScript(url,baseLine,Node(),str);
+
m_executingScript--;
script = oldscript;
+
+ if ( !m_executingScript && !loadingExtScript ) {
+ // kdDebug( 6036 ) << "adding pending Output to parsed string" << endl;
+ src.append(pendingSrc);
+ pendingSrc.clear();
+ } else if (!prependingSrc.isEmpty()) {
+ // restore first so that the write appends in the right place
+ // (does not hurt to do it again below)
+ currentPrependingSrc = savedPrependingSrc;
+
+ // we need to do this slightly modified bit of one of the write() cases
+ // because we want to prepend to pendingSrc rather than appending
+ // if there's no previous prependingSrc
+ if (loadingExtScript) {
+ if (currentPrependingSrc) {
+ currentPrependingSrc->append(prependingSrc);
+ } else {
+ pendingSrc.prepend(prependingSrc);
+ }
+ } else {
+ write(prependingSrc, false);
+ }
+ }
+
+ currentPrependingSrc = savedPrependingSrc;
}
void HTMLTokenizer::parseComment(TokenizerString &src)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list