[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
beidson at apple.com
beidson at apple.com
Wed Mar 17 18:10:26 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit a3094891016491837e2877c52502ae84390bf1ad
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 2 21:46:02 2010 +0000
Followup for REGRESSION(r51097) - Unable to log in to statefarm.com
<rdar://problem/7672667> and https://bugs.webkit.org/show_bug.cgi?id=35556
Reviewed by Sam Weinig.
WebCore:
* dom/ScriptElement.cpp:
(WebCore::ScriptElementData::shouldExecuteAsJavaScript): To more perfectly match Gecko's rule,
strip whitespace from the attribute values before comparing to window/onload/onload().
LayoutTests:
* fast/loader/for-window-event-onload-scripts-expected.txt:
* fast/loader/for-window-event-onload-scripts.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 880c3fd..064fbb3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-02 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Followup for REGRESSION(r51097) - Unable to log in to statefarm.com
+ <rdar://problem/7672667> and https://bugs.webkit.org/show_bug.cgi?id=35556
+
+ * fast/loader/for-window-event-onload-scripts-expected.txt:
+ * fast/loader/for-window-event-onload-scripts.html:
+
2010-03-02 Chris Fleizach <cfleizach at apple.com>
Reviewed by Beth Dakin.
diff --git a/LayoutTests/fast/loader/for-window-event-onload-scripts-expected.txt b/LayoutTests/fast/loader/for-window-event-onload-scripts-expected.txt
index df5c47a..89f7c0a 100644
--- a/LayoutTests/fast/loader/for-window-event-onload-scripts-expected.txt
+++ b/LayoutTests/fast/loader/for-window-event-onload-scripts-expected.txt
@@ -2,4 +2,10 @@ ALERT: This script SHOULD be run because it has both 'for=window' and 'event=onl
ALERT: This script SHOULD be run because it has both 'for=window' and 'event=onload()'.
ALERT: This script SHOULD be run because it only has a for attribute.
ALERT: This script SHOULD be run because it only has an event attribute.
+ALERT: This script SHOULD be run because it has both 'for= window ' and 'event=onload()' and the whitespace should be irrelevant.
+ALERT: This script SHOULD be run because it has both 'for=window' and 'event= onload() ' and the whitespace should be irrelevant.
+ALERT: This script SHOULD be run because it has both 'for= window ' and 'event= onload() ' and the whitespace should be irrelevant.
+ALERT: This script SHOULD be run because it has both 'for= window ' and 'event=onload' and the whitespace should be irrelevant.
+ALERT: This script SHOULD be run because it has both 'for=window' and 'event= onload ' and the whitespace should be irrelevant.
+ALERT: This script SHOULD be run because it has both 'for= window ' and 'event= onload ' and the whitespace should be irrelevant.
diff --git a/LayoutTests/fast/loader/for-window-event-onload-scripts.html b/LayoutTests/fast/loader/for-window-event-onload-scripts.html
index cdb2e87..638c6e6 100644
--- a/LayoutTests/fast/loader/for-window-event-onload-scripts.html
+++ b/LayoutTests/fast/loader/for-window-event-onload-scripts.html
@@ -22,3 +22,27 @@ if (window.layoutTestController)
<script event="BAR">
alert("This script SHOULD be run because it only has an event attribute.");
</script>
+
+<script for=" window " event="onload()">
+alert("This script SHOULD be run because it has both 'for= window ' and 'event=onload()' and the whitespace should be irrelevant.");
+</script>
+
+<script for="window" event=" onload() ">
+alert("This script SHOULD be run because it has both 'for=window' and 'event= onload() ' and the whitespace should be irrelevant.");
+</script>
+
+<script for=" window " event=" onload() ">
+alert("This script SHOULD be run because it has both 'for= window ' and 'event= onload() ' and the whitespace should be irrelevant.");
+</script>
+
+<script for=" window " event="onload">
+alert("This script SHOULD be run because it has both 'for= window ' and 'event=onload' and the whitespace should be irrelevant.");
+</script>
+
+<script for="window" event=" onload ">
+alert("This script SHOULD be run because it has both 'for=window' and 'event= onload ' and the whitespace should be irrelevant.");
+</script>
+
+<script for=" window " event=" onload ">
+alert("This script SHOULD be run because it has both 'for= window ' and 'event= onload ' and the whitespace should be irrelevant.");
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9bbcae3..bf1a576 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-02 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Followup for REGRESSION(r51097) - Unable to log in to statefarm.com
+ <rdar://problem/7672667> and https://bugs.webkit.org/show_bug.cgi?id=35556
+
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElementData::shouldExecuteAsJavaScript): To more perfectly match Gecko's rule,
+ strip whitespace from the attribute values before comparing to window/onload/onload().
+
2010-03-02 Chris Fleizach <cfleizach at apple.com>
Reviewed by Beth Dakin.
diff --git a/WebCore/dom/ScriptElement.cpp b/WebCore/dom/ScriptElement.cpp
index 2902a3f..731c3ba 100644
--- a/WebCore/dom/ScriptElement.cpp
+++ b/WebCore/dom/ScriptElement.cpp
@@ -250,6 +250,8 @@ bool ScriptElementData::shouldExecuteAsJavaScript() const
if (forAttribute.isEmpty() || eventAttribute.isEmpty())
return true;
+ forAttribute = forAttribute.stripWhiteSpace();
+ eventAttribute = eventAttribute.stripWhiteSpace();
return equalIgnoringCase(forAttribute, "window") && (equalIgnoringCase(eventAttribute, "onload") || equalIgnoringCase(eventAttribute, "onload()"));
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list