Changeset 67642 in webkit
- Timestamp:
- Sep 16, 2010 11:19:03 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r67640 r67642 1 2010-09-16 Patrick Gansterer <paroga@paroga.com> 2 3 Reviewed by Darin Adler. 4 5 [Mac] Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey. 6 https://bugs.webkit.org/show_bug.cgi?id=41510 7 8 * platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt: 9 * platform/mac/fast/loader/user-stylesheet-fast-path.html: 10 1 11 2010-09-16 Zhenyao Mo <zmo@google.com> 2 12 -
trunk/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path-expected.txt
r43672 r67642 1 1 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. 2 2 3 PASS 3 PASS 100px 4 PASS 140px 5 PASS 150px 6 PASS 160px 7 -
trunk/LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html
r43672 r67642 4 4 synchronously, instead of invoking the asynchronous loader. 5 5 </p> 6 <p id="result"></p>7 6 <script> 8 var result = document.getElementById("result"); 7 var testObjects = [ 8 {result:true, size:"100px", url:"data:text/css;charset=utf-8;base64,Ym9keSB7Zm9udC1zaXplOiAxMDBweH0="}, 9 {result:false, size:"140px", url:"data:text/css;charset=utf-8;base64,Ym9k$#eSB7Zm#9ud(C1zaXp)lOiAxNDBweH0="}, 10 {result:false, size:"150px", url:"data:text/css;charset=utf-8;base64,Ym9ke%00SB7Z%20m9udC1z\n\taXplO#iAx%03NTBw%eH0="}, 11 {result:false, size:"160px", url:"%50%30%10%00%20%40"} 12 ]; 9 13 10 14 if (window.layoutTestController) { 11 15 layoutTestController.dumpAsText(); 12 16 layoutTestController.setUserStyleSheetEnabled(true); 13 layoutTestController.setUserStyleSheetLocation("data:text/css;charset=utf-8;base64,Ym9keSB7Zm9udC1zaXplOiAxMDBweH0=");14 17 15 document.body.offsetTop; 16 if (getComputedStyle(document.body).fontSize == "100px") 17 result.innerText = "PASS"; 18 else 19 result.innerText = "FAIL"; 18 for (var i = 0; i < testObjects.length; i++) { 19 var obj = testObjects[i]; 20 layoutTestController.setUserStyleSheetLocation(obj.url); 21 22 document.body.offsetTop; 23 var result = getComputedStyle(document.body).fontSize == obj.size; 24 document.write((result == obj.result ? "PASS" : "FAIL") + " " + obj.size + "<br>"); 25 26 layoutTestController.setUserStyleSheetLocation(""); 27 } 20 28 } else 21 result.innerText = "This test can only be run in DumpRenderTree.";29 document.write("This test can only be run in DumpRenderTree."); 22 30 </script> -
trunk/WebKit/mac/ChangeLog
r67639 r67642 1 2010-09-16 Patrick Gansterer <paroga@paroga.com> 2 3 Reviewed by Darin Adler. 4 5 Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey. 6 https://bugs.webkit.org/show_bug.cgi?id=41510 7 8 This prevents usage of nil value, which would cause an uncaught exception. 9 10 * WebView/WebPreferences.mm: 11 (-[WebPreferences setUserStyleSheetLocation:]): 12 1 13 2010-09-16 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/WebKit/mac/WebView/WebPreferences.mm
r67518 r67642 642 642 locationString = [URL _web_originalDataAsString]; 643 643 } 644 644 645 if (!locationString) 646 locationString = @""; 647 645 648 [self _setStringValue:locationString forKey: WebKitUserStyleSheetLocationPreferenceKey]; 646 649 }
Note: See TracChangeset
for help on using the changeset viewer.