[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:28:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 328a5f3d08a1267147a88b6577d6b63ab4036fce
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 16 18:19:03 2010 +0000

    2010-09-16  Patrick Gansterer  <paroga at paroga.com>
    
            Reviewed by Darin Adler.
    
            [Mac] Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
            https://bugs.webkit.org/show_bug.cgi?id=41510
    
            * platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt:
            * platform/mac/fast/loader/user-stylesheet-fast-path.html:
    2010-09-16  Patrick Gansterer  <paroga at paroga.com>
    
            Reviewed by Darin Adler.
    
            Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
            https://bugs.webkit.org/show_bug.cgi?id=41510
    
            This prevents usage of nil value, which would cause an uncaught exception.
    
            * WebView/WebPreferences.mm:
            (-[WebPreferences setUserStyleSheetLocation:]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67642 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 500a086..a1b4899 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-16  Patrick Gansterer  <paroga at paroga.com>
+
+        Reviewed by Darin Adler.
+
+        [Mac] Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
+        https://bugs.webkit.org/show_bug.cgi?id=41510
+
+        * platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt:
+        * platform/mac/fast/loader/user-stylesheet-fast-path.html:
+
 2010-09-16  Zhenyao Mo  <zmo at google.com>
 
         Unreviewed, test TAG fix.
diff --git a/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt b/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt
index bbad1e7..cb45d38 100644
--- a/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt
+++ b/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt
@@ -1,3 +1,7 @@
 This tests that when the user style sheet location is set to a data: URL with base64-encoded UTF-8 data, the style sheet is processed synchronously, instead of invoking the asynchronous loader.
 
-PASS
+PASS 100px
+PASS 140px
+PASS 150px
+PASS 160px
+
diff --git a/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html b/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html
index 0805484..a920bfe 100644
--- a/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html
+++ b/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html
@@ -3,20 +3,28 @@
     URL with base64-encoded UTF-8 data, the style sheet is processed
     synchronously, instead of invoking the asynchronous loader.
 </p>
-<p id="result"></p>
 <script>
-    var result = document.getElementById("result");
+    var testObjects = [
+        {result:true,  size:"100px", url:"data:text/css;charset=utf-8;base64,Ym9keSB7Zm9udC1zaXplOiAxMDBweH0="},
+        {result:false, size:"140px", url:"data:text/css;charset=utf-8;base64,Ym9k$#eSB7Zm#9ud(C1zaXp)lOiAxNDBweH0="},
+        {result:false, size:"150px", url:"data:text/css;charset=utf-8;base64,Ym9ke%00SB7Z%20m9udC1z\n\taXplO#iAx%03NTBw%eH0="},
+        {result:false, size:"160px", url:"%50%30%10%00%20%40"}
+    ];
 
     if (window.layoutTestController) {
         layoutTestController.dumpAsText();
         layoutTestController.setUserStyleSheetEnabled(true);
-        layoutTestController.setUserStyleSheetLocation("data:text/css;charset=utf-8;base64,Ym9keSB7Zm9udC1zaXplOiAxMDBweH0=");
 
-        document.body.offsetTop;
-        if (getComputedStyle(document.body).fontSize == "100px")
-            result.innerText = "PASS";
-        else
-            result.innerText = "FAIL";
+        for (var i = 0; i < testObjects.length; i++) {
+            var obj = testObjects[i];
+            layoutTestController.setUserStyleSheetLocation(obj.url);
+
+            document.body.offsetTop;
+            var result = getComputedStyle(document.body).fontSize == obj.size;
+            document.write((result == obj.result ? "PASS" : "FAIL") + " " + obj.size + "<br>");
+
+            layoutTestController.setUserStyleSheetLocation("");
+        }
     } else
-        result.innerText = "This test can only be run in DumpRenderTree.";
+        document.write("This test can only be run in DumpRenderTree.");
 </script>
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 67ac0ca..e8c86fb 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-16  Patrick Gansterer  <paroga at paroga.com>
+
+        Reviewed by Darin Adler.
+
+        Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
+        https://bugs.webkit.org/show_bug.cgi?id=41510
+
+        This prevents usage of nil value, which would cause an uncaught exception.
+
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences setUserStyleSheetLocation:]):
+
 2010-09-16  Dan Bernstein  <mitz at apple.com>
 
         Reverted the previous change because r67628 has been reverted.
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 075ffa8..ae751df 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -641,7 +641,10 @@ static WebCacheModel cacheModelForMainBundle(void)
     } else {
         locationString = [URL _web_originalDataAsString];
     }
-    
+
+    if (!locationString)
+        locationString = @"";
+
     [self _setStringValue:locationString forKey: WebKitUserStyleSheetLocationPreferenceKey];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list